I've long tried to make sense of how The Federation is organized, and how the economy works.
I've generally narrowed it down to The Federation being organized more similarly to something like the European Union. The member worlds are exactly that, members and still sovereign nations in their own right. The Federation offers an alliance with a set of shared laws/responsibilities.
The Federation Council allows representation by Member Worlds. I never bothered with the EXACT specifics, but essentially every Member World would receive one or two delegates into the Council. The distinction of Member World is important, with three levels of association with the Federation, Member, Colony and Protectorate. Member Worlds are fully represented on the Council and considered to be sovereign entities. Colonies are worlds that are a part of a Member Worlds, not considered sovereign, and get Council representation via their associated Member World. Protectorates are given a seat on the Council, without voting privileges
Earth gained dominance over the Federation by the unique way humans spread from their homeworld. Most worlds tend to have only a small number of colonies, preferring to remain mostly within their home system. Humans had an odd fixation with expansion and settling any habitable world they could fine. Furthermore, they were even more perplexing to the galactic community by often allowing their colonies to form their own, sovereign nations. These former human colonies largely became Federation Member Worlds. Even more strange, despite being otherwise unaffiliated with Earth, humans by and large were still united by race, even if they hailed from different nations. This led to humans dominating the Council, due to the many human Member Worlds.
Economy-wise, it's a mixed back. To facilitate trade between members, the Federation has a unified currency in the "credit", although member worlds are free to operate their economies as they see fit. Earth moved away from using "money" in the late 22nd century... although it may be something of a misnomer to truly say that. It's not communism, there is still personal property, and there is absolutely still resource allocation for finite goods and services. Rather than currency, Earth operates on something of a "social credit" system... an individuals contribution allows them access to more resources. It's entirely possible to live on Earth with no credit at all... you will be provided shelter, food, clothing, etc. If you want more... you need to contribute. When Scotty "bought a boat", he didn't use "money", he essentially requisitioned a boat and it was granted due to his high credit score. Something like Sisko's restaurant generates credit by offering a service of preparing and serving food... that credit in turn allows Sisko to requisition fresh ingredients, and those eating there would likely have to allocate some of their resources for it. (Since it's a finite resource, eating at Sisko's every day even if you can "afford" it would lower your credit score... hogging up too many resources is frowned upon.)
In the case of something like Deep Space 9, which is Bajoran property and has many businesses that do operate on hard currency, it works the same way for Starfleet officers... they can simply requisition latinum, and provided they have enough resource credit available, they will get it.
Acquisition of wealth is a slippery slope. People want to have access to more resources, but hoarding resources and flaunting "wealth" will have a counter effect... your "credit score" will drop, cutting your access, due to being a drain on resources. One can only be SO "wealthy" in Earth society. Those who want more can seek out their fortune elsewhere with no ill will.