Population numbers don't matter anymore. Automation is the future and the progress is just accelerating. You still need humans of course, but the amount of people needed will take a massive dip. A.I generated art is going to reduce artists jobs by 90%. Voice actors are probably next on the chopping block, considering that A.I can generate realistic human voices now. Then 3D modelers. Then animators and VFX artist. The entire entertainment industry will go though a massive shake up in a couple of years. Low level code monkey and data entry jobs are also going to have their numbers reduced by 90%. Lawyers are already losing jobs due to automated documents discovery. Radiographist are also in massive danger. Hundreds of millions of jobs in developed countries are probably going to be lost in the next decade due to automation.
Then you get the physical jobs, self driving cars will take away tens of millions of jobs overnight. Factories are just gonna get more and more automated as time goes on. Warehouses are already automated so much as to need ten times less workers then they did 20 years ago. Construction jobs are also gonna be more and more automated as time goes on. Physical soldiers will be less and less needed compared to drones. Fighters pilots as a concept will probably disappear when Gen 6 jets get developed. And if humanoid robots get developed, then all bets are off.
In 10-40 years, an aging population is probably the best problem to have when compared to the seething masses that get automated out of their job that they spent years studying for. All the countries that imported millions of low skilled workers that can barely read or write will be punching themselves in the balls. The countries that will benefit will be the ones that can train the A.I models and develop the robots that the A.I will use for physical labour. America and China,,, Maybe Europe. Everyone else, especially Africa, is fucked.