This implied link between public pensions and demographic collapse paints a picture that social security was destined to fail because people wouldn't have children for the purpose of taking care of them in old age. The millennial generation, the largest American generational cohort, were born almost 50 years after the founding of social security. How does it make sense that public pensions motivated millennials to not have children, but not their parents?
Across all developed countries where you have demographic collapse you have societies where it becomes more and more expensive to raise children. The public pension system requires that the economy grows year after year and that becomes hard when your population shrinks. As to why the population is shrinking you have to look at why people aren't having children. And when you ask that question you get way more "I can't even afford to buy a house" and not "the government is going to take care of me when I'm old".