I'm not a treky but to solve those distribution problem we'd need something like those replicators.

I don't know the_g_nee, I think the best government is a dictatorship with an absolute legend in office. No one hates a great ruler, just his/her heir.