The demographic decline is very predictable so it could in theory be managed but that takes unpopular measures so it´s another thing politicians ignored for too long.
Changing pay as you go systems is problematic. If AI and robots can plug the gap then there is still the question of how much money you get from that. Easier to fix if the whole world agrees on some standard otherwise some robot industries might move out to a cheaper place. Then there are other things. More people needed in care, different housing needed etc.