Two developments stand out above the rest.
As industrial cities swelled, waste piled up in streets and courtyards, and cholera outbreaks followed. The great engineering projects of the 1800s — underground sewer networks and piped, filtered drinking water — broke that cycle. Separating sewage from drinking supply did more for urban life expectancy than almost any medical advance of the century.
The same era saw the rise of public health boards, refuse collection, building codes, and inspection of food and housing. Germ theory gave reformers the argument they needed, and slum clearances, parks, and improved ventilation followed.
Together, those two shifts turned the crowded industrial city from a place people fled into somewhere they could reasonably survive.