I mean, the Federation was only founded after a world war decimated the human population. And I also think, looking at our world, that we are more likely to be the mirror dimension anyway.
I also noticed that religion was absent from most of the star trek stories, and usually, if at all, was associated with an underdeveloped culture, and they would most likely be warlike and a threat.
To blame capitalism for the lack of a Star Trek future is to fundamentally misunderstand why capitalism is the way it is.
Capitalism isn't some evil calamity that fell from the sky. Human beings created it. No matter what system you make, we will inevitably corrupt it so long as selfishness and greed are hardwired into our primate brains. Communism, socialism, capitalism, whatever. They all need hard rules to work because humans will turn any system into a way to enrich themselves, and given time, they will even erode the rules to do it.
For every extraordinary bit of technology or otherworldly space entity or reality shattering cosmic event to ever show up in Star Trek, the single most unbelievable thing about it is the notion that the human race could ever, collectively, and permanently forego their selfish instincts. Its a society that only works if the human race changes itself on a fundamental, evolutionary level, and does so in unison. Because as long as any human feels a desire for more than they have, or the desire to protect what they do have, we'll never achieve that.