Consider that the faster a population is declining, the more people will live of the productive work of each working age adult.
China, for example, is now encouraging three children. Whether that will work or not, we don't yet know. But we'll see increasing number of countries experimenting with encouraging, then likely rewarding, higher number of children. Even a modest reversal of fertility rates will prolong the time to global decline significantly.
Imagine overall numbers are going down, country X is increasing, while it's neighbors are decreasing.
Also imagine country Y has seen a century of improvement powered by population growth dry up. Now it is looking at stagnation and decline as the population ages. This is a recipe for social unrest.
"The bourgeoisie, by the rapid improvement of all instruments of production, by the immensely facilitated means of communication, draws all, even the most barbarian, nations into civilisation. The cheap prices of commodities are the heavy artillery with which it batters down all Chinese walls, with which it forces the barbarians’ intensely obstinate hatred of foreigners to capitulate." (Communist Manifesto)
Whatever one thinks about Marx, the conflict between the continuation of economic growth and resistance to immigration is real. And in the face of a threat of population decline, resistance to immigration will become economic suicide, and so anti-immigrant populists and the economic elites will come to increasingly face off against each other.
The biggest examples are contrasting the US and China.
Both China and the US have similar fertility rates, well below replacement.
However, the US augments and stabilizes the population growth with immigration. Immigrants both add to the total, and have many more children than native born individuals.
China on the other hand has net migration out of the country, and fewer immigrants to stabilize the population and rate.
Because of this, China is much more vulnerable to the impacts of a population bust.
With respect to immigrants having more children, that's true to some extent, but with the caveat that 1) immigrants tends to have children at similar rates as where they come from, and that means you'll see immigrants from fewer and fewer places are likely to have a fertility rate above replacement, and 2) fertility rates among people of immigrant background tends to normalise to their surrounding environment within a generation or two, so it's a short term boost.
But back to China, it will be very interesting to see how they react to this. Odds are there'll be increased pressure to have more kids, coupled with carrots, but that they still won't be able to avoid allowing increased immigration. Then that raises the question of this means they'll start making paths to permanent residency or citizenship easier, or if they'll go the gulf state route of importing a near indentured servant class. The latter might be hard to sustain once other countries also start competing for the same labour sources.