One part of the answer is productivity. (https://data.oecd.org/lprdty/gdp-per-hour-worked.htm)
You need more production to fulfil the needs of the non-working elders. You can achieve that by increasing the number of workers (producers), or by increasing the amount produced by unit (productivity). But then the problem is how to distribute the result.
This was Stephen Hawkins position when he stated that we should be more frightened of capitalism than robots. https://www.cnet.com/news/stephen-hawking-says-we-should-be-...
In a very efficient and automated world distributing wealth is a bigger problem than creating it.