Capitalism was eliminated on Earth by the New World Economy, which was likely a Dictatorship of the Proletariat as envisioned by Marx, Engels, Lenin, Roddenberry, etc. The Federation appears to be a classless, moneyless post-DotP society that still has one primary state apparatus (the Federation itself) that oversees many smaller state apparatuses (the Federation’s many member-worlds). You’ll notice a contradiction, though: If a state “is a system by which the ruling class maintains and perpetuates its dominance within the social formation… by subjugating the other class(es) within class society” then how can the Federation be a classless society? I propose two solutions:
Star Trek is fiction and fictional worlds are often incomplete and contradictory. Everything I’ve said about the New World Economy, the Federation, etc. should be taken with a grain of quadrotriticale.
No society has established a DotP, and there are certainly no examples of post-DotP societies. Marxism is a scientific and materialist worldview – it has evolved since the 19th century and it will continue to evolve into the 23rd century and beyond.
EDIT: My answer is “Yes, but it’s Advanced Sci-Fi Communism.”