It's like a weird, liberal version of communism that runs on pure ideology and replicators. The closest that Star Trek ever came to radical leftism was Deep Space 9; coincidentally, it's also my favorite Trek series hands down.
The one that tried to mix currency, jingoism, entrepreneurship, and state paranoia into Federation society? How do you figure?
Because it showed that the namby-pamby liberal ideology of the Federation only really applies to the rich core worlds like Earth, and people on the fringes needed to result to violent struggle to defend their homes. It also portrayed terrorism and sabotage as a valid method to fight back against fascist oppressors. It portrayed brutal racism and subtler forms of bigotry faced by black americans in the 20th century and envisioned the 21st century as a hyper capitalist shithole where poor people are rounded up into lawless enclaves where they murder each over scraps while the rest of society simply calls them lazy bums and don't give a fuck. Rom also leads a workers strike and launches the first successful labor movemnment in Ferengi history. Section 31 is also a good analogy for the CIA, support the idealized life of its citizens through clandestine terror campaigns and assassinations.
DS9 may not be Marxist, but it's a lot more aggressive and radical than any of the other series.
If all that had actually been intended as an incisive commentary on the idealism of Roddenberry-era Trek, that'd be true. But to me it just looks like a failure of imagination on the part of the DS9 writers. They set out to make Star Trek more "realistic," and the only realistic world in their minds was a neoliberal one. For all Roddenberry's many faults, he at least had the ability to comprehend that people will be different when they're living under different material circumstances. Just as a medieval peasant and a 21st century industrial worker would be incomprehensible to each other, that same 21st century worker would seem very alien to someone in the 24th century (and vice versa). His notions of exactly how that would happen and what form it would take were silly and idealistic, sure, but in some ways preferable to the DS9 writers' assumption that neoliberal individualism and military/security statehood will persist indefinitely into the future (part of that, of course, is also Roddenberry's fault; he was in the Navy, so he conceived of Starfleet as a navy, which was his failure of imagination).
There's obviously no guarantee that whatever economic arrangement we have 400 years from now will be communism, but we can practically guarantee that it won't be capitalism. Of course, even in DS9 whatever system the Federation has probably can't meaningfully be called capitalism (it's hard to tell; things like Sisko's father having a restaurant really muddy the issue), and yet the superstructure is virtually identical with some minor tweaks. It's like bad historical fiction that simply reflects the modern sensibilities of the writer but with different costumes, only projected into the future instead of the past.
Roddenberry tried. He failed miserably because he was a drug-addled liberal, but he tried. The DS9 writers just shrugged and said, "lol I guess there'll always be the same ol' shit because human nature, y'know?"
Two points in closing:
1. I'm not at all a fan of the notion that science fiction should be a reflection of modern issues and problems but with spaceships. This is related to the historical fiction analogy above. Extrapolating from modern conditions via science fiction is great; taking modern conditions and slapping lasers on it is intellectually lazy. This is why LeGuin is one of my favorite authors. Even Frank Herbert with his weird feudal fantasies knew better, though. Science fiction doesn't have to labor under the burden of being "topical."
2. All that being said, you make a lot of good points that really affect how I look at DS9.
I think it's a valid argument that a replicator-based society, post-scarcity or not, would almost certainly have the different economic and social arrangement than isn't comparable to any past or present socioeconomic system, communism or otherwise, and any "realistic" portrayal of the far future by all means shouldn't resemble modern earth in the slightest. Writers often create dystopian futures with a stereotypical working class struggle of an underclass of exploited laborers and the like, but with the recent increased awareness of automation gradually making a human workforce smaller, if not obsolete entirely, and the possible looming need for a basic income system, The Expanse's vision of future Earth seems like a more realistic dystopian vision of the future, at least one that hasn't collapsed due to the government having the common sense to remedy the working class's obsolescence with basic income:
Star Trek's vision of the future based around a replicator-based economy is considerably more optimistic, of course. But either way, something like the Honorverse's portrayal of "The People's Republic of Haven" where a basic income creates a permanent underclass of lazy dolists who don't want to work and results in an economy that constantly teeters on the edge of collapse and can only be sustained by the Republic conquering and looting nearby star nations sounds more and more like bullshit. Something that Weber himself apparently seemed to eventually realize, as I recall that Haven was later retconned as a dystopia caused by greedy oligarchs exploiting its universal basic income that was originally intended for good.Avasarala: Did you know that the majority of people on Earth don't have jobs? They don't work at all. They live on Basic Assistance, which the government provides.
Draper: I did know that.
Avasarala: You call them "takers," I believe.
Draper: Yes, ma'am.
Avasarala: It's not that they're lazy, you know. It's just that we can't give them enough opportunities. In this building it's easy to forget...
Korshunov: With all due respect, madam, where are you going with this?
Avasarala: Wherever I goddamn like!
But even so, writers like David Weber and Lois McMaster Bujold create futuristic settings that are supposed to be set centuries or even millennia into the future but are more or less economically and socially comparable to modern-day earth just with FTL and space warships and lasers, and maybe some basic social progress extrapolated into the future like racism and sexism and homophobia no longer existing. Though even this can seem very sketchy and dubious at times, like the complete absence of explicitly non-heterosexual characters in the Honorverse until Eric Flint came along. Or The Vorkosigan Saga where women are explicitly stated to be pressured to be homemakers and homophobia is alive and well except on the hippie Beta Colony, and let's not even get into weird shit like Barrayar's hyper-patriarchal warrior aristocracy or Cetaganda's creepy two-tiered aristocracy where upperclass women are routinely married off against their will as trophy wives to warrior caste men as a means of keeping the latter in line. I suppose this can be understood to a point considering these works are clearly a product of the 80s and 90s, but even so...
Still, it's pretty clear that most people don't care about how realistic a futuristic society is written, as long as the author tells a good story. (Or alternatively, caters to a certain niche's political views...) It is, after all, pretty much impossible to tell exactly what the far future will look like, so people's definition of 'realism' in that regard will differ greatly. But I still consider it a fallacy to call the Federation "Communist" when that kind of system isn't comparable to modern day economics, due to being based around technology that doesn't even exist yet. As this blog post says in response to Picard's speech to Lily in First Contact:
This future isn’t even on the communist-capitalist scale that we only think of when it comes to contemporary economics. The United Federation of Planets is a “non-monetary economy” where internal capital does not exist, people can get whatever they need when they need it thanks to advanced technology and highly-efficient distribution systems, and trade with external organizations is funded through monitored allowances so as not to destabilize foreign economies.
Basically, the idea is that once the survival and comfort needs of a population are met then they can devote all their time to personal, community, and societal enrichment by pursuing their own dreams free of worry. Want to be a scientist? Go to school tuition free and have access to all the lab equipment you need. Want to be a gourmet chef? Find a kitchen you like or open one on your own and cook as much as you want. Want to explore the galaxy? You can still do any of that other stuff, but now you do it on a spaceship!