More to the point, people mistakenly assume that any story centered on a guest character is a Mary Sue story, when the label was actually meant to describe (or rather, parody) examples of that kind of story done badly, with the author's wish fulfillment outweighing decent storytelling. People forget that in '60s and '70s TV, it was quite common for episodic shows to center their episodes on guest characters, because guest characters could go through actual growth and change and life-and-death drama while the leads had to remain permanently the same. TOS was supposed to be that kind of show, which was why Roddenberry pitched it to execs by comparing it to Wagon Train, a show that actually named each of its episodes "The [Guest Star] Story." You can see it in the early first season -- the second pilot centered on Mitchell and Dehner, "Mudd's Women" focused on Eve and Harry, "Charlie X" centered on Charlie, etc. That changed somewhat when Spock became the breakout character and the network wanted him to be the focus, with Roddenberry and Shatner pushing to keep Kirk ahead of Spock in importance, so that the show ended up centered on the two of them plus McCoy. There's also the fact that Piper is not the guest star of her novels. She's the lead character of a semi-spinoff starring Piper, Sarda, Merete, and Scanner and following their adventures as junior crew of the Enterprise, with Kirk, Spock, etc. being the supporting cast. In other words, it's pretty much exactly the format of the new animated series Lower Decks, or of the TNG episode of that name. (Or Babylon 5: "The View from the Gallery," or Stargate SG-1: "The Other Guys," or the Young Justice animated series vis-a-vis the Justice League.) I've never had a problem identifying with characters of a different gender. If you can make believe you're a different person in a different time, it shouldn't be that much harder to make believe you're different in your physical attributes. And it's not like it matters that much to most of the experiences the character would have, aside from situations that would be unlikely to be depicted in a PG-rated narrative. In my experience, it's not hard to keep that straight. It's the same as writing dialogue, except that it's the whole thing instead of just parts. If anything, that makes it easier.