I think the infant mortality rate was rather more to do with diphtheria, yellow fever, scarlet fever, polio, measles, mumps, smallpox, etc. than whether they were fed the correct milk or whether it was massively sterile or not.
There were lots of reasons people died early back then - heck the odds of surviving giving birth weren't great - you can't explain that with making sure feedants are the correct temperature.
Wet nurses were extremely common in the past if breastfeeding from the mother was not possible. They had ways around it before sterilisation of milk became feasible or recognised.
Not that I'm rubbishing the idea of being sterile I hasten to add - yes that is an important thing too (one of the major ones yes), it's just massively overblown to sell gadgets now as you say - possibly to the point of actually being harmful these days.