Exactly.
I fell an uncontrollable need to say this every time someone posts about historical "life expectancy."
It's not "life expectancy" but "average life expectancy." And the average life expectancy being so low was due to the high infant/child mortality. If you could make it through childhood back then, you were probably going to live to be a relatively old person. The kids dying was what brought the average life span down. It wasn't uncommon for parents to lose multiple children due to small pox, measles, polio, rubella, whooping cough, and even, yes, influenza. The world was a dangerous place to be a kid, but there wasn't a planet full of 40-somethings on their deathbeds. Sure, we have better end-of-life care nowadays, but that's not what brings the average life expectancy up to what it is today.