It's been ages since I've read the script and I honestly can't remember if I ever actually saw the movie, but I thought your guess regarding the LOST IN SPACE movie was a good one.
For some reason, reading the red laser corridor makes me think there's a Xindi arc Enterprise episode I barely remember that had them. Then the half-machine / sphere thing makes me think it's a Voyager Borg episode. And the captain inheriting the half-man / half-machine makes me think it's something I watched while on LSD, even though I've never taken LSD. Reminds me of Locutus though. My bet so far is on a Borg episode. I don't know which, so the wiki comes to the rescue with a list of episodes (click show all if you have JavaScript on). This thread is particularly trippy for me, because I finally decided to rewatch Star Trek partly because I wanted to find a particular episode of Star Trek I clearly remembered watching when I was ten. Yet, now I am pretty certain it's a figment of my imagination born after watching a Klingon arc in early TNG and mixing it up with Treasure Planet or something. The episode I "remember" is about Klingons travelling on some mission aboard a Klingon ship, who ended up visiting present-day (20 century) Earth. Can't exactly describe my memory of it, but the beginning of the first episode of Enterprise, sans the suliban, gave me a déjà vu. I was almost certain the Klingons had landed in a 20th century corn field in my dream episode, presumably by time travel.