It sounds like Star Trek has a lot of similarities with the Culture novels. Both depict an imagined communist utopia in which everyone is flawless, that butts up against or sometimes interferes with other flawed societies.
In Star Trek (as written by Roddenberry) the Federation is a society that doesn't use money, there is no internal strife, virtually everyone is moral and good with Picard being the apex human, the Federation is vaguely democratic but the show is basically uninterested in that aspect of things, and they all exist in a sort of post-scarcity world. The communist nature of Star Trek TNG/Voyager is quite obscure until you see it, and then you can't unsee it anymore. This is no surprise because Roddenberry's views changed in the decades between TOS and TNG until by the 1980s he was an avowed Maoist.
I've actually written an essay about the communist nature of Federation society, along with some of the inevitable contradictions and problems this caused for the writing team:
https://blog.plan99.net/i-want-to-see-a-libertarian-star-tre...
Obviously it's not a very serious essay but at the end I do wonder why there are so few optimistic depictions of the future. Even though the arc of human history has been solidly upwards, very little fiction is willing to extrapolate that forwards, and when it does happen the authors are always communists so we get weird, implausible takes on human nature that make humans feel more alien than the aliens. I guess it's because Marxism requires at its core an explicitly utopian prediction of the future to offset the rather less utopian consequences of bloody revolution. Whereas capitalism - being not so much an ideology as a thing that springs up naturally even when governments are trying to suppress it - doesn't have any kind of view on what the future will look like.