Elizabeth M. Caucutt, Thomas F. Cooley, and Nezih Guner write

During the period from 1880 to 1940 pay-as-you-go social security systems emerged in most advanced economies. In this paper we describe a model economy in which demographics, technology, and social security are linked together. We study an economy with two technologies, agricultural and industrial, where the decision to migrate from rural to urban locations is endogenous and linked to survival probabilities and productivity differences. Furthermore, the level of social security is determined by majority voting. We show that a calibrated version of this economy is consistent with the historical transformation. Initially a majority of voters live on the farm and do not want to implement social security. Once a majority of the voters move to the city, the median voter prefers a positive social security tax.

The paper itself contains disturbing scenes of mathematical masturbation.

The thing is, the idea that the transition from an agricultural economy to an industrial economy changed the politics for social security seems interesting and plausible. But I would go for a relatively simple story that says you have lots of kids in an agricultural economy, and you do a lot of intergenerational risk-sharing within the family. In the industrial economy, you start to see smaller numbers of children, and to get the intergenerational risk sharing you need to enlarge the pool beyond the family. Something like that…