True, but even from the perspective of a capitalist realist, the Federation is a far preferable philosophic alternative to many other 'socialist utopian fantasies.'
If you compare the Federation to, say, The Culture, the former is less repulsive in almost every way. The Federation is a socialist utopia because the technology exists to easily make it one. There's nothing wrong about that, if we had machines that made everything for us, we'd be post-scarcity too, money has no meaning if there is no shortage of anything. The important part is, they're still a moral (oftentimes alarmingly so) people, they have principles, ethics, respect for other cultures, and most importantly it is a society of people, living people, who are in charge of their own destinies. They're explorers artists and scientists, not the hedonistic gerbils of godlike AIs. They're what the ideal society of people would be if they had infinite wealth--which they effectively do. They're tolerant, they don't project their culture onto others--even weaker, less developed ones--and rape other civilizations into being more like them. They're not insidious, they're not arbitrary, they don't compromise their ethics. They're a society that even I, a fairly conservative person, would have no problem seeing our culture evolve into. They're austere, they focus on things that matter, on defining the meaning of their existence through good works, exploration and expansion of knowledge. They reject the idea of being slaves to anyone, even people who are genetically created to be superior--they shut that shit down!
Gene Roddenberry was a godless commie, sure, whatever, but he was a goddless commie who wanted a future that was respectable, moral, and ultimately human. He didn't want people to stop being people, he wanted people to be all that people could be. It might be a utopian fantasy, but it doesn't taste like orange juice after toothpaste, and that's a hell of a lot more than you can say for some.