it's just that most of the world is using archaic thorough/continuous model for pension system which is basically pyramid scheme everyone would avoid if it were used in any other area, but somehow is acceptable for pensions
if you really worry about pensions, you could start with children contributing to their parents pension and nobody contributing to childless people, that should solve declining population very fast, your can combine it with raising retirement age and raising fees everyone pays towards their own retirement