A political scientist friend of mine just posted this, and I was surprised to read a very well-thought out account of how the post-scarcity economy of the Federation might function: https://medium.com/editors-picks/29bab88d50
Because the welfare benefit is so large, and social pressure is so strong against conspicuous consumption, the average citizen never pays any attention to the amounts allocated to them, because it’s perpetually more than they need. But if they go crazy and try and purchase, say, 10 planets or 100 starships, the system simply says “no.”
Citizens have no financial need work, as their benefits are more than enough to provide a comfortable life, and there is, clearly, universal health care and education. The Federation has clearly taken the plunge to the other side of people’s fears about European socialist capitalism: yes, some people might not work. So What? Good for them. We think most still will.