The main problem with speculation about gender reassignment, or gender in general in the future is that Star Trek is not a scientific study in futurology. It is a story made today, for people living today, about issues and topics that are a matter of public discussion today. Marginalized people want representation today, not listening to privileged writers handwaving their existence away and declaring it utopia. Whether they speculate that being trans will be meaningless because people could just change their biological sex whenever they want to or that there won't be trans people because their bodies will be genetically engineered to match their gender and they'd be anatomically indistinguishable from cis people, it doesn't matter. Both trivialize the issues, struggles and existence of a marginalized group who are fed up with being used as props in whatever wish fulfillment fantasy the writer is creating. These kinds of fantasies, especially the latter one, have the very unpalatable implication that the problems of gender- and sexual minorities won't be solved by society accepting them as normal members of a diverse humanity, but rather by "curing" them and making them "normal."
Speculation about the future is not an exact science. It's more like creative writing. Different people will make different speculations, so arguing that X will be so and so in the future, or that a creative choice in a piece of speculative fiction is unrealistic/unscientific, is entirely meaningless. It's not the writer's job to calculate and extrapolate how society and technology will look hundreds of years from now. It's not even their job to make a story scientifically accurate according to our current understanding of it. Their job is to make a story that engages an audience living today.