Oh I think the intention was that there really were no female captains at that time, and there was probably an offical regulation about it. The issue is how well we can wiggle around to distort the intention of the episode because of how sexist and awful it is. It really tarnishes the optimistic future where Earth has overcome prejudice.
It was the intention of
that specific script. That does not make it the intention of the entire series. Sometimes an isolated episode will get something wrong, like the way "The Alternative Factor" contradicted what had
already been established about how antimatter and dilithium worked. It is okay to ignore one episode's intention if the rest of the series clearly disregards it. Just call it a mistake and move on. You don't have to be a slave to authorial intention. The audience is allowed, indeed expected, to bring their own interpretations to a work of fiction, even when those interpretations conflict with what the author intended.
There's a lot to criticize about this episode, but it has to be said that Shatner's performance sold this idea. His performance as Kirk inhabited by Lester was equal mix of WTF! and brilliant nuance. Equally Sandra Smith was pretty good as Lester inhabited by Kirk.
Wow, I couldn't disagree more. Shatner was just playing a generic "hysterical female," a characterization just as sexist and ill-considered as the rest of the episode, while Smith was just playing a generic strong authority figure. Usually when shows do body-switch episodes, the actors do impressions of each other's speech rhythms and mannerisms; often they'll do recordings of how they would deliver the lines so that their body-switch counterparts can study and emulate their performances. But Shatner and Smith made zero attempt to mimic each other in any way, which is bizarre given how highly imitable Shatner's performance style is. It's the worst body-switch acting I've ever seen in my life.
I don't recall if any of the novels had a TOS era female starship Captain.
The
Vanguard novels have at least two female starship captains, plus a female JAG captain. As stated,
The Entropy Effect had Captain Hunter.
Vulcan's Forge establishes that a female Starfleet captain sponsored Spock's admission to Starfleet Academy in 2247. My
DTI: Forgotten History features a Makusian female captain in 2274. Diane Duane's
My Enemy, My Ally had the female Denebian captain Nhauris Rihaul.
There were a couple of female captains in the TMP-era comic strip from the LA Times Syndicate. IDW's
Captain's Log: Pike comic establishes that Yeoman Colt had become a captain by 2266, and their
Mission's End has a captain Elizabeth Cassady in 2265.
And those are just some examples. Female captains are far from uncommon in Trek novels, comics, and games set in any century, because nobody has wanted or bothered to take "Turnabout Intruder"'s bad ideas seriously.