It’s a valid theory, and I certainly think it’s a contributor, but I would also argue that the “boom” years of fertility in modernity have been tied to periods of widespread benefit for most, if not all. When prospective parents and grandparents see the potential for a brighter future, there’s more societal pressure to have kids because their success will naturally boost your own. Then when the vice starts tightening, the idea is that having more kids improves your own prospects of survival and comfort in old age.
Then the systems of the world had to make a choice: pay for the old at the expense of the new, or support the new by capping benefits on the old. This takes the form of social welfare programs in most developed countries, but industrialization also clamped down wealth in the hands of those who owned the means of production, and kept it from the hands of labor absent mechanisms of redistribution. Industrialization by its nature necessitates a larger investment to begin competing with established players in ways former artisans and businesses lacked: machinery, labor, logistics, technology, real estate, and materials all require expensive, up-front, and lengthy investment before potential payoff in an industrialized world that pre-industry societies didn’t have to deal (as much) with, thus locking most Capital and wealth into the hands of those who already had it to begin with. An aristocracy on steroids, choking and hoarding the lifeblood of a healthy economy into their private coffers.
This plays out differently in each country depending on its economic maturity and what function it served in the global marketplace, but the outcome was the same: with entertainment being plentiful and cheap compared to the immense risks and costs of child rearing in an increasingly dim future lacking in a cohesive, collaborative narrative to be inspired by, fertility collapsed.
"But we gave 1000 lucky participants $3.50 and a used bubblegum wrapper to share between them and it didn't measurably affect their marginal propensity to have children at all! Extractive economics couldn't possibly have anything to do with the fertility crisis!"