I recently read an interesting argument that the federation isn’t in fact communist, but basically something beyond our current economic concepts.
We have:
explicit self determination, individualism and self fulfillment are held in the highest regard, so much so that it is considered the objective of life to find personal fulfillment and in doing so, giving back to society
post scarcity economy, everyone can have any material need fulfilled at any time by virtue of replicators. Though many goods and commodities are still produced in the traditional way to provide a better quality product (how is this limited amount allocated?)
Money is not used internally, but the federation has no objection to using it for commerce with other cultures. There is also indication for power tied credit system that federation citizens are subject to, for example for complex replication and transport
being a merchant or trader, or rather generally seeking profit and material wealth are, while considered outdated by most, not offensive or even illegal within the federation. There is plenty of evidence for private enterprise, for example the publishing studio that distributes the doctor's holo novel in VOY
And many more, even contradictory to our current day minds, aspects that put the federation system and ideology someplace further than our current concepts.
It has always seemed to me that their society is what you'd get if the United States didn't have billionaires hoarding 90% of the wealth. Allocate all of those resources fairly, reduce the population, add in some free electricity and replicators, and you have TNG.
They don't have money, and other than Starfleet and The UFP council, they don't seem to have government. I assume that someone is still administering France, since we do see France still exists, but they don't refer to The US, because I don't think the US survived to the 24th century. There's an argument to be made that they're mostly communist.