We will be able to generate the labour that is needed to sustain social care for an elderly / infirm / disabled population but only if AI/robotics +/- working life extension are publicly owned and democratised.
Unfortunately, the main developers of AI/robotics exist in a multinational space which cannot be legislated for by a single country. These corporations have already influenced our lawmaking to the extent that we can't easily legislate against them without being liable to pay extortionate compensation for their losses (I believe)
As things get a lot worse, perhaps it will be possible for individual countries to deglobalise, develop their own artificial labour and refuse external corporate owned artificial labour to maintain independent economies and their own independent welfare state. These are just my utopian musings though.
I rather see us heading towards a dystopia of gross and worsening inequality where the only way to earn / gain wealth is to belong to the class which owns the artificial labour technology. And if this reaches an extreme where this class simply do not need human labour, then what will become of the rest of humanity?
We've already seen what happens to human beings whose lives are not considered by the powerful to have economic or democratic worth - poverty, famine, genocide.
In the past when an elite has pushed the ordinary population too far, the end result has been revolution usually accompanied by their destruction. Occasionally a more gradual process towards democratisation and wealth redistribution. But they have always needed the labour of the workers and have never been so powerful as they are / will be. I fear the rest of us will not be capable of any meaningful resistance and will have no bargaining chips.
Only democracy stands in their way by redistributing some power in the absence of wealth but I fear Western democracy is in decline / being actively dismantled by those with vested interests.
Another consideration is working-life extension. So medical breakthroughs which extend healthy working life, making the old young again. But if that is possible, unfortunately its benefits to humankind will be severely curtailed by the endless drive to profit of its corporate owners/developers. The same problem as for artificial labour but less bad in that working human beings will still actually be needed. The downside being the extended life or even immortality of those who are already most powerful / wealthy - further exacerbating inequality.
The only long term hope for the majority of humankind is to urgently legislate to protect democracy and address wealth/power inequality so that the sociopaths who get to the top don't get to decide humanity's fate by themselves. They're not up to the job.