That the UFP or Starfleet would only be up to Deep Space 9, rather than DS 227 or 32596 or whatever, makes me think that these designations are actually short-lived and recycled.
That is, yeah, "deep space" in the name means "outside UFP proper", even if the relevant border happens to be within an hour's travel from San Francisco. But the UFP expands. So stations originally established in deep space by the above definition become stations within UFP space sooner or later - and the DS number is liberated for reuse. The DS installation then might become a starbase. Or then something else.
The idea of recycling DS numbers and reassigning them to some installation in a totally different section of the galaxy sounds like it would lend itself to some confusion.
As for starbases, we have seen all sorts. It's probably again more a question of location than of the nature of the facilities. A copy of a tiny relay station can be a starbase, or a vast mushroom can. Or then a location might be, even before the installation of facilities. "Measure of a Man" sees the establishing of a starbase with a very low number in the late 24th century, suggesting that whatever the SB number might be, it isn't an ordinal to denote order of construction.
I believe this was noted in the original "Nitpickers Guide" (I miss those), but I actually have an explanation for that. The base in "Measure" was explicitly said to be close to the Neutral Zone. My thought was that it is a replacement for a previous base, which was one of the targets of a then-unknown alien force in "The Neutral Zone".
Would there be starbases next to homeworlds? The point for founding the very first in ENT would have been to establish a base away from home, as home already had facilities aplenty. We never really hear of a starbase next to a homeworld - when we see an installation, it's just a base, and naturally enough, as it isn't out there at the stars but right here.
Yeah, the idea of starbases around all these core Fed worlds doesn't seem right. Establishing them further out, where they can be more of service to long-range vessels makes more sense to me.