Post scarcity societies can’t be approached in any meaningful way with modern economic theories.
Star Trek is neither socialist nor capitalist, as both are systems designed to manage and portion out scarcity, and are based on economic theories that lack any predictive abilities in systems that don’t work in a context of scarce resources that need administration.
Neither the labour theory of value nor marginal utility theory make any sense when all resources are trivial to obtain for individuals and whatever resources your community uses can be reused virtually endlessly within the limits of entropy.
Too bad ¯\_(ツ)_/¯