It is far more likely that the Federation would be one of countles thosuands of space realms that gradually merge to form a galaxy wide government.
The TV Tropes site has a trope called:
Sci-Fi Writers Have No Sense of Scale.
https://tvtropes.org/pmwiki/pmwiki.php/Main/ScifiWritersHaveNoSenseOfScale
Dr. James Van Allen
note was once asked by a reporter to 'define space'. He replied, "Space is the hole that we are in."
Most people can't get their minds around just how big the universe is. So
it should come as little surprise that most
Speculative Fiction writers can't either.
This is chiefly true of creators of TV, film, and video game SF.
Creators of written science fiction can be positively obsessive about accuracy.note If your qualitative yardstick is based around an author's ability to describe distances, this may be a useful way to distinguish good print science fiction from bad print science fiction.
https://tvtropes.org/pmwiki/pmwiki.php/Main/ScifiWritersHaveNoSenseOfScale
The Milky Way Galaxy consists of a few hundred billion stars and their planets, plus several times as great a mass in widely and thinly spread mysterious dark matter.
Most of the stars in the Milky Way Galaxy are in the galactic disc, which is about 100,000 light years in diameter and about 1,000 light years "thick" between its "upper" and "lower" edges. In our part of the galaxy, the average distance between a star and its nearest neighbor star is about 5 light years.
Astrobiologists estimate that only a minority of stars in the galaxy have planets habitable for life forms in general. Since, even on Earth, many lifeforms flourish where unprotected humans would swifly die, planets where unprotectd humans could survive are a minority of planets habitable for lifeforms, which in turn are a minority of planets.
And yet it has been estimated that there might be 600 million planets habitable for humans in the Milky Way Galaxy.
https://www.rand.org/content/dam/rand/pubs/commercial_books/2007/RAND_CB179-1.pdf
And possibly billions of planets not habitable for humans but habitable for some types of life forms.
That's right -- we're not as special as we thought. It turns out that in the
Milky Way, scientists now believe that there are 60 billion planets in the habitable zone.
https://science.howstuffworks.com/planets--universe-support-life.htm
So there are possibly about 60 billion planets in the Milky Way Galaxy. that could potentially have some sort of life, and which maybe do have life.
Of course space opera stories like
Star Trek often assume that planets with life - and even planets habitable for humans and intelligent aliens similar to humans - are many times more common than the estimates of scientists.
And so some science fiction writers imagine very vast, galactic-wide governments. For example, in E.E. Smith's
Lensman series the governments of two galaxies, each governing millions or billions of industrialized planets, fight a war. In the first big space battle there are millions of space battleships, but the battles get larger during the war.
By contrast,
Star Trek space maps often show realms like the Federation or the Romulan Empire, or the Dominion, spread out across large parts of the galaxy, each possibly ruling 1 to 10 percent of the total volume of the galaxy, and thus ruling at least a billion star systems each, with probably millions of industrialized planets considering how common planets with advanced societies seem to be in
Star Trek.
But during war stories, such as the Dominion War in DS9, important space battles between major powers involve fleets of tens or hundreds of space warships. In the DS9 episode "Sacrifice of Angels' the Federation fleet had only 600 warships and the Dominion and Cardassians had only 1,200.
So it seems like
Star Trek writers often have no sense of scale. Thus I can believe some future
Star Trek movie or series could involve the United Federation of Planets ruling the entire Milky Way Galaxy and yet having only 10,000 inhabited and industrialized member worlds, even though that would make no sense considering how common civilized planets seem to be in
Star Trek.
What would be far more plausible than the Federation expanding to include the entire Milky Way Galaxy would be the United Federation of Planets merging with the First Federation and the Star Federation to form the United Federations. And later the United Federations might merge with the Federated Stellar Unions to form the United Federations and Unions. And after a series of such mergers to form larger and larger space realms, there might eventually - after many, many mergers - be a realm including the entire Milky Way Galaxy. A realm that the former United Federation of planets would be a tiny part of.
.