Japan and Germany may be sitting on a ticking demographic time bomb where aging populations begin to drag down economic growth. Good thing they’re also prime candidates for robot revolutions.

Increased automation and more use of robotic technology in these manufacturing powerhouses could help cushion the impact, according to Moody’s Investors Service.

“To the extent that robots can undertake activity that require labor, they will compensate for the negative impact that a slower growth in labor force would have otherwise had on growth,” Moody’s analysts wrote in the report this month.

Dependency ratios — the share of those older than 65 years of the total population — are projected to soar in both Germany and Japan. But these countries have two things going for them. Manufacturing exports in Germany, Europe’s largest economy, already make up more than a third of gross domestic product; in Japan that stands at 12 percent. They’re also both early robot adopters.

About three-quarters of total global sales of industrial robotics machinery are concentrated in five countries: China, Japan, the United States, South Korea and Germany, with adoption concentrated in the automotive and electronics sectors. Among these, the three Asian countries bought abound half of global industrial robots since 2013, led by China, Moody’s says.

At a time when some politicians are playing up concerns that globalization is killing domestic employment, robotics could lead to the return of some jobs that were outsourced to lower labor-cost destinations. Still, the number of jobs that will return would be less compared to the livelihoods lost earlier, Moody’s says in the report.

Emerging market countries could be the losers. Countries like Hungary, the Czech Republic and Slovakia where exports of high-tech manufacturing goods account for more than 50 percent of GDP — 16 percent to 20 percent of which go to Germany alone — could be at risk. Low-wage countries like India and Indonesia would also face challenging times.

“In addition, manufacturing processes could also move to other production centers that are better equipped to absorb the new technology and can compete in the supply of high-tech products,” the report says. “In either case, some emerging market economies may lose export-market share because the new technology could change modes of production and trade patterns.”