Don’t forget that back then the roads were dirt. And wheeled traffic was via horse. So there was horse shit all over the streets. Then when clean water, sewers, petrol engines, and paved roads came in, public health got a lot better because the bacterial and viral load in the air dropped immensely.
Japan has the most relaxed vaccine schedule while having one of the lowest infant mortality rates. The opposite is true for the US.