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.
But you have no clear onscreen evidence to support that notion. Actually that's the beauty of what is on the screen in that they didn't paint themselves into a corner. If they had then this discussion wouldn't be happening.
It would have been nice if TOS had simply shown us (or referred to) a woman of command rank. Imagine if one of the Starfleet Admirals seen on the viewscreen or one of the starbase Commodores had been cast as a woman. What if Commodore Stone, Commodore Wesley or Commodore Mendez had been a woman? That said I don't think it would have been a good idea to have cast Commodore Decker or Captain Tracy or Commodore Stocker as women because I could just see some attributing their erratic behaviour to being female.
Seeing Matt Decker's emotional breakdown is a genuinely powerful dramatic moment made all the more so because Decker is a man of Kirk's breed, position and training. You can just imagine the horror witnessed to break this man. I don't think it would have played as well if Decker had been a woman, at least not back then.