I think that it's ultimately damaging to the connection you have to an audience of twenty first century humans to go too far into the weeds of "what would the 23rd/24th century really look like?"
Star Trek doesn't even properly address the impact of its own technologies (eg the replicator, which led to the never ending post scarcity debate, or the transporter which as written can make you immortal with an army of clones).
If you start obsessing over the fictional future being "realistic", you'll quickly lose the real world relevance that connects you to your audience as well as the ability to tackle current issues from an accessible lens that is the biggest strength of the science fiction genre.
On this topic specifically, it's also a convenient way to erase people the 2020 audience deem "broken" in some way. Yes, a society as advanced as Starfleet would probably have the scientific ability to reprogram particular sexual or gender identities. They could probably eliminate races too, for that matter, or the male sex. But why would they and why would we want to see that?
"Let us redefine progress to mean that just because we can do a thing, it does not necessarily mean we must do that thing"