Yeah but the current fertility rate is something like 1.55.
So let’s base this on an old fashioned nuclear family model (I know it’s not like that across the board, but it’s easiest for the stats). Basically for every couple of 2, they’re producing 1.55 kids. Which means in 20 years time we have a workforce that has a massive disproproportinae number of 50 year olds for new entrants. In 50 years time the majority of adults are a pensioner. It’s worrying.
Increasing AI and automation of white collar functions can step in to fill that gap
The problem then is who financially benefits from the economic activity performed by AI? If it's a small number of capital/AI-owners becoming super-rich (and able to dodge paying tax) then the country won't be able to financially support all those pensioners.
So the task is finding a way to remove the beneficial ownership of the AI/automated function from a small number of capital-owners, and place that into the hands of the state, who can then distribute it to those past working age.
The jobs that are unable to be AI'd/automated will still need doing, and they can be performed by those of working age. Ideally in conjunction with the implementation of a Universal Basic Income.
I'm being incredibly simplistic here, but as a very broad principle it's theoretically sound.
And beats hands down keep importing an every-increasing number of people to perform the jobs to pay for the old age living of that aging population, whilst a small number of super-rich live a parasitic lifestyle of hoovering up income derived from the labours of others.