The US somehow avoids this, likely by putting state capitals and the national capital into smaller cities. Hence NYC, SF, Chicago, Dallas, Miami, Seattle, etc are all big urban agglomerations, but are not the points that concentrate everything important in their respective areas.
Those cities aren’t really good examples of intentionally putting a state capital in a smaller city of the state.
Albany is older than NYC, and anyway the concept of NYC as a single large city is barely 125 years old. The original capital of Illinois is (strangely) west of the Mississippi River and south of St. Louis. By treaty between Great Britain and France, the current area of Illinois was off limits to European settlement, until after the revolution when the US said “that treaty doesn’t apply to us”. Chicago wasn’t a big or important city until the civil war.
Los Angeles has been the wealthiest and most populous area in Alta California since like 1800 or so. But it was established as a puebla and not a mission, so it could never be a center of government under Spanish rule.
Miami was fairly unlivable until air conditioning and malaria control, and its geographic location was extraordinarily inconvenient until after the interstate system.
The US government established a customs house in Olympia when it and Seattle were little more than a handful of homesteads. And guessed wrong on which would grow faster.
more random support for your critique of a post-hoc, and historically ignorant, classification of "small cities". Offhand the CA capital contest was ongoing one and tracked from south/central CA towards the north in the mid 1800s. It's entirely unsurprising that they landed in the Sacramento courthouse; it was ~1850 and Sacramento was 1) last inland port for shipping 2) major terminus for the gold fields 3) an obvious rail hub for the connectivity in the 1850-60s, esp bay area to Sacramento and the east. Even a trivial look at the (flawed) 1850 census shows that basically all of the (mostly new) immigrant population was in Sacramento and the goldfields. eg Los Angeles was 3,500 people compared to 9,000 in Sacramento.
Similar for the Washington Territory which was barely a collection of homesteads and tiny villages. IIRC Olympia was the first significant immigrant settlement in the northern Oregon Territory, the major (only?) early trade connection to shipping on the pacific, and connected to the few other settlers moving north in to the territory. Its not very surprising that it was the territorial capitol and remained so for the state. Yes, post statehood a lot of rail & shipping traffic moved north. But at least through the turn of the 20th century both Tacoma and Seattle were roughly equivalent in population and industry. Arguably the easier ship access for the Klondike is what cemented the prosperity of Seattle pre-war, and Boeing & related defence activity post war. But _at the time of territory & statehood_ Olympia was the major town in the region.
DC has a larger metro population than half of those cities, and is the clear economic hub of its respective area. I’m not sure the national capital is a great example of a smaller city, although of course is smaller relative to the US than London is to the UK.