The key to the success if socialism is infinite resources, which is the replicator. If you can ask for anything at all, and that thing pops out of the machine at zero cost - then socialism works perfectly. Otherwise, no.
If everything is inherently free, that sort of solves half the problems of communism. Replicators work by converting energy into whatever form can be programmed into it. So you have free energy and free material goods. But this gives rise to another problem: the energy needed to create a cup of Earl Grey tea (hot) is enough to vaporize a city. Can everyone be trusted with that?