I know that the economics don't actually work like this, but this is the social contract.
If your pension benefits are calculated based on a 4 workers/retiree ratio, but then your whole generation has like 1 kid per family then the system will obviously break down...
Productivity gains on the other hand get easily eaten up by increased consumption/expectations, or are overstated to begin with: producing 5 times more TVs/ipads does not make the plumber cheaper (nor a house), and unaffected professions actually suffer (=> baumol effect).
Is that because higher earners make higher contributions to the pension plan?
Retirees then get paid based on how many points they have.
Both the worth and the "cost" of those points scales with average income every year.
This basically autocompensates for inflation and rising wage levels, but decreases in population size are problematic.
But the social contract does not care about that.
Except the farmer demands you grow while stomping all over you, and then reserves the fertilizer for the dying crops.