I always see the European Union as the best real-life comparison to the Federation. The member worlds remain independent although part of a wider family with certain obligations on membership.
In this case, assimilation of a military into Starfleet and probably rules relating to anti-protectionism, free trade, and establishing a legal framework to ensure no discrimination in favour or against other Federation species!
In any arrangement like this there has to be a central administration monitoring the level playing field and doing the legal legwork. Someone somewhere has to intervene when the Betazoids are using telepathy to skew their wins in the annual Orion Poker festival.
Planets at a certain distance from this are too far away to communicate with effectively, from the centre, and this skews the level playing field. This probably offers a practical expansion limit to the Federation as suggested by the OP.