I have to wonder, if Trelane intended to really kill Kirk at the end. My guess is no, reason being he was basically a child in a man's form basically doing all the play things we guys did as kids. Or if he did kill Kirk to fulfill his adventure fantasy...would he have the power to bring him back? You could tell at the end when Trelane was being reprimanded by the aliens that Kirk kind of felt this way too.
Well, I killed a fair number of bugs as a child. And, I remember other kids rubber banding firecrackers to crawdads. We all know there are a fair number of kids out with varmint guns, assassinating small mammals and birds (although, not in cities and mostly in "Red states"). And kids occasionally commit actual murder... So, maybe.
When I was a kid I did all that stuff--firecrackering and shooting small animals, magnifying-glass-burning ant hills, etc. This all took place in cities in the ultra-blue state of California. I feel bad about it now, and I didn't turn into a psychopath or serial killer.
My dad read an apocrypha-type Star Trek novel about how Trelane was a rogue Q, and the Q we know from TNG was his dad. Trelane's behavior lines up with what immature Q are like, though that doesn't explain why he needed a machine to aid him in creating a small paradise on Gothos. Even infant Q can do things like knock planets out of their orbits.
Anyway, I read in the synopsis on the back cover that (the John DeLancey) Q came to Picard, asking him for help against Trelane, because by Picard's time, Trelane had both grown up and finished his punishment, and had then truly gone rogue as well as becoming very dangerous. Picard and Q had to both find a way to stop him. I did not read the book, so I don't know what happened.
I'm afraid the story is not considered canon, though it would have explained a lot about Trelane's powers and behavior.
He has *some* Q-like powers, but even forgetting the machine, his powers paled in comparison to Q's power. After Kirk shot out the mirror machine, the now enraged Trelane told Kirk to go back to his ship where he would be dispatched later presumably.
Q would simply snap their fingers for their will to be done immediately.
A fan fiction to tie in Trelane to the Q might be that -
Trelane was not actually a Q but his (adoptive ?) parents were.
Trelane was "part" Q and needed some help so they made a machine for him to simulate power. Maybe Trelane really was a 5 year old Q boy who appeared as an adult and his powers weren't all that well developed...
And yes, Trelane really would have killed Kirk. And then when the unmoving corpse proved to be no fun, he either would have made the corpse vanish and found a new toy, or brought Kirk back to life so he could be played with some more. Hmmm... there's an idea for an AU fan fiction...