Given the low birth rates of some countries (I'm looking at you, Hong
Kong* and Singapore), it's only a matter of time before they simply depopulate
themselves out of existence. But how long do they have?

The Economist did the (wild) projection:

In Hong Kong, for example, a cohort of 1,000 women is now expected
to give birth to just 547 daughters. If nothing changed, those 547 daughters
would be succeeded by 299 daughters of their own, and so on. Extrapolating
wildly, it would take only 25 generations for Hong Kong’s female
population to shrink from 3.75m to just one. Given that Hong Kong’s
average age of childbearing is 31.4 years, the territory would expect
to see the birth of its last woman in the year 2798.

By the same unflinching logic, Germany, Italy, Japan, Russia and
Spain will not see out the next millennium. Even China has only 1,500
years left.

Anybody who extrapolates millennia ahead is a fool. At the rate technology is developing, Homo sapiens will no longer exist within a century, because we will have redesigned ourselves as Homo sapiens II.