There are certain sci-fi plot devices that are hard to distinguish from supernatural stories. STAR TREK veered into this territory all the time.
In The Cage, the Talosians create illusions that might as well be spells they cast.
In WNM, Gary Mitchell and Elizabeth Dehner gain powers that are a lot like magic. An alternate interpretation is to say they were possessed. But since Dehner wasn't possessed by an evil force, it seems that Mitchell was just a bad guy waiting to happen.
What about Charlie X, and the somewhat similar case of Captain Garth in Whom Gods Destroy? Somebody taught them magic.
Catspaw was made expressly as a Halloween episode to air in October, and it calls the witches by name. The themes include both possession and magic.
Wolf in the Fold (SPOILER ALERT) is a demonic possession story that goes all the way into horror. Scotty is possessed and he murders two women. This being TV, once the explanation comes out, all is forgiven. It's an incredibly lucky outcome for Scotty, what with all the blood on his hands.
Or did the demon stay in Mr Hengist the whole time, and just cause Scotty to black out? That sanitizes Scotty, but Act IV clearly shows the demon's ability to jump from person to person. Why not possess Scotty to kill the women? Poor Mr Hengist from Rigel IV, who's just another victim of possession, is holding the bag when Kirk needs to kill the demon. That's an unlucky guy, and his death is not memorialized in the slightest.
The Lights of Zetar is another possession story, with a ghost angle, and it could have been a lot scarier if they'd wanted it to be. Like (and I shouldn't say this), if JJ Abrams remade it as a horror film, it could creep the crap out of people. But the TV version was pretty mild.
That's good. I like your post. There's really a fine line a times between science and sorcery. I think even the Metrons and Orgainians might fall under this although no one expresses it in the episodes. And the god, Apollo, who seems to have supernatural powers but they seem to "explain" him scientifically.
2 things I want to reply to your post. I thought the possiblity existed, unsaid of course, that wasn't Gary's conscience mind but he was possessed by an energy being/disembodied spirit. When he weakened himself on the force field his eyes went back to normal and his voice, that could have been the last time "Gary" was able to speak himself, the rest was the thing that was trapped when it's ship was destroyed by the barrier, a "spirit wall" if you want. Wasn't there some crazy story about it being constructed to protect the galaxy from some external threat?
The other thing was about Mr Hengist. I never really thought about Scotty's body being used to kill the women, only that he was in close proximity and the killer more or less handed the corpse to him when done, there by leaving Scotty covered in evidence. If it feeds on fear, the fear Scotty had about being a serial killer could have been a between meal snack. Also, when the spirit left Mr. Hengist, Bones reports that he's dead, as if Mr Hengist was an animated corpse. So maybe that's why they didn't mind "killing" him. Actually, that drug couldn't last forever, and Mr. Hengist being already dead, the vacuum of space would just mess him up if he materialized. If wide dispersal mean the transporter deliberately "spread him around" and he didn't rematerialize, then the spirit would have been freed again and it could be waiting for another chance to catch a ship, like "The Day of the Dove" , another malevolent spirit.
Sorry, I can get really wordy when I like something.