Capitalism is fine with it actually.
The issue is that there will be too many old people and not enough young people to support them.
But old people have most of the money. So, lots of money will still be spent. Capitalism will be fine. Sure, some old people will have no money and bankrupt their children. But capitalism does not care about that.
It would have been a bigger problem before AI and robotics. But capitalism will shrink the workforce faster than birth rates.