Star Trek doesn't bear up to any economic analysis. It's not even worth trying.
No, its not. Its just phenomenally wealthy compared to any place in the real world today.
If the Federation was post-scarcity, then many of the plot lines in the various shows wouldn't happen, and the Federation, notably, wouldn't be getting into conflicts with neighbors for scarce resources like territory, etc. (And if it did because the other party started it, it would wave its hand to generate an arbitrarily-capable defensive force, win the conflict, and be done immediately -- which obviously isn't what actually happens in any of the series in that situation, which seems to recur fairly regularly.)
And Star Trek only gets more contradictory baggage as it goes on (in one episode of TOS they essentially resurrect the bridge crew using transporters; so I guess they could replace all the dead security officers too). It's explicitly stated, many times, that there's no money. But none of the implications of this are followed through.
And this nonsense suffuses the entire show, not just the economics. The new J.J. Abrams movies manage to be even worse, but at least they're fast-paced and the actors are trim. (Why does the Federation need to make deals with Khan when Spock just gave them interstellar transporters that can penetrate shields and target starships moving at warp?)
About the only thing that makes sense in Star Trek is that their security teams are utterly incompetent. In a world with infinite wealth and resurrection machines, there's little incentive to stay in shape and learn difficult (and painful) combat skills.
Deep Space Nine is not Federation property, however - while it is only administrated by the Federation, it remains the property of the Bajorans. Presumably, payment for use of space is part of the arrangement with the Bajoran government.
> Star Trek doesn't bear up to any economic analysis. It's not even worth trying.
I can't beat Tetris, either.
Presumably the post scarcity Federation could simply build its own arbitrarily large and luxurious DS9 next door to it. In any event, space isn't likely to "cost" anything.
His profit comes from the other customers who pay in other currencies, including but not limited to, latinum.