Exactly. Peter David saw what the episode implied might have happened but not been shown due to the constraints of 1960's television and ran with it. It's not "wishing" it had happened, it was seeing a potential thread and running with it.At a guess, I'd say it's a combination of not having seen the episode recently (or forming the belief back in the pre-streaming, pre-DVD days when any given episode was catch-as-catch-can) so the memory has a chance to play tricks, along with reading between the lines (or taking the episode seriously but not literally, to coin a phrase), seeing what the episode was able to communicate in a 1960s family-hour TV slot and extrapolating it out into the "real world" of Star Trek that wasn't limited by those constraints, seeing the literal events of the episode as a sort of visual euphemism that the adults would understand without scarring the kids.
I found it nowhere near as objectionable as the Voyager Homecoming duology, which still angers me to this day. As it should anyone who's ever known victims of sexual abuse.