There’s a lot of survivorship bias there. Cheaply built stuff from 200 years ago, well, isn’t there anymore, mostly. And even a lot of the expensively built stuff is in extremely poor condition.
For an example of this, commuter rail has been around since the 1830s. Take an old commuter rail line and look at the stations. What you’ll probably find are a couple of old stations, often central, often hideously impractical, and a bunch of newer stations, a century old or less. That’s not because the commuter line was originally built with three stations, it’s largely because the old stations had to be entirely replaced at some point. Most 1830s structures would simply not last 200 years.
And honestly the new stations are usually much better than the old ones; they have more sensible platform arrangements and are accessible and leak less. Part of this is experience, but also part of it does sometimes come at the expense of making the building uglier.