There's nothing deus ex machina about the ending to Charlie X. Thasians were discussed in two different scenes before the climax, in conjunction with Charlie's existence and with his powers. The very first mention of Thasians, near the beginning of the episode, is with a suggestion that Charlie may have lied about them. The arrival of the Thasians is both logical and inevitable, by the story's on terms.