BERLIN — Lurking just beneath the surface in any debate about advances in digitalization and automation is a deep-seated fear that sooner or later robots will replace humans.

For Germany, what some call the “Robot Apocalypse” might actually be a good thing — if it helps alleviate the looming skilled-worker shortage that’s threatening to undermine Europe’s largest economy.

If anything, Berlin might even be wishing for more — smarter — robots.

By 2030, Germany could face a shortage of 3 million skilled workers, according to recent research by consulting firm Prognos AG. While digitalization could compensate for as much as half of the lost labor pool by some estimates, it won’t resolve the problem.

Indeed, for all the promise of digital manufacturing, there’s little evidence automation will lead to fewer industrial jobs overall.

“We’re not going to run out of work, but it’s going to become more complex,” said Christian Böllhoff, the head of Swiss-based Prognos, which has studied the effects of digitalization on Germany’s workforce.

“The fastest and most effective way to deal with the skilled-worker shortage is to improve the situation for working families" — Christian Böllhoff, head of Swiss-based Prognos

Even if advances in artificial intelligence make it possible to substitute even mid-level staff, as some technologists predict, companies will continue to need skilled workers to manage and service the new machinery.

While job descriptions are expected to change, most jobs are expected to remain. Researchers at the Mannheim-based ZEW economic institute project that just 12 percent of German jobs are exposed to automation.

Companies are already worried. For the first time, a majority of German firms cited Fachkräftemangel (skilled-worker shortage) as the top risk to their businesses in a regular business sentiment survey by the Association of German Chambers of Commerce and Industry (DIHK). Four out of five companies say the difficulty they have in finding skilled workers is preventing them from investing in innovation, while half see their economic future at risk, according to another report.

“The challenge is huge,” German Labor Minister Andrea Nahles acknowledged last week.

Biology is the root of Germany’s skilled-worker problem. Germany, which has one of the world’s lowest birthrates, is aging fast. Beginning around 2020, the country’s baby boomers will begin going into retirement, robbing the economy of a crucial source of expert labor. By 2060, Germany’s work-age population, now at 50 million, could fall by a quarter, according to government projections.

Demographics isn’t the only issue: Not enough German students are preparing for the digital future.

Germany’s vocational apprentice system, in which companies offer high-school students on-the-job training, is admired around the world. But not enough students are going into IT-related professions. Last year, for example, IT only ranked fifth among young men pursuing an apprenticeship. Twice as many students took up training as car mechanics. Among young women, office management topped the list, followed by retail sales.

“We need to rethink how we secure skilled labor in Germany,” Nahles said.

That’s easier said than done.

Obvious options, such as raising the retirement age are politically tricky. Germany recently raised its retirement age to 67 and though economists argue it should be raised to 70, that’s unlikely to happen any time soon. In Sunday’s campaign debate between Angela Merkel and Martin Schulz, her Social Democrat challenger, the chancellor pledged not to hike the retirement age.

Another possible solution is immigration. Germany has benefited from an influx of EU labor in recent years, but has had more difficulty attracting qualified workers from other parts of the world.

Since 2012, Germany has attracted more than 60,000 highly-skilled workers under the EU’s Blue Card program.

The country would need a much larger influx to compensate for the skilled workers leaving the workforce. But political costs of opening Germany’s doors to foreigners — as illustrated by the recent refugee crisis — can be considerable.

An easier option could be to get more women into the workforce by improving Germany’s childcare infrastructure. While nearly 70 percent of working-age German women are in the labor force, about half are in part-time work.

“The fastest and most effective way to deal with the skilled-worker shortage is to improve the situation for working families,” Prognos' Böllhoff said. “That means creating conditions that allow women, in particular, to pursue employment.”

Whatever solution German policymakers pursue, there’s a broad consensus that they need to act soon.

“Today we are a country enjoying the highest level of employment in our history, for which we receive considerable praise in Europe” — German Chancellor Angela Merkel

As the country’s pool of skilled technicians and engineers withers, German companies are likely to invest more in regions with the skills they need, such as North America and Asia.

In some areas, this is already happening.

Consider Germany’s vaunted car industry, which employs about 1.8 million people directly and indirectly in the country.

Though brands such as Mercedes and BMW still benefit from their “Made in Germany” cachet, many of their cars are already made in other parts of the world. BMW, for example, produces more cars at its plant in South Carolina in the U.S. than it does at its main Munich factory.

Germany’s solid economic performance in recent years and its low unemployment rate have largely masked its unpreparedness for the digital revolution.

That said, Germany’s political leadership isn’t blind to the threat. Even the German chancellor has begun subtly warning of the challenges that lie ahead.

“Today we are a country enjoying the highest level of employment in our history, for which we receive considerable praise in Europe,” Merkel said a speech to the German parliament on Tuesday. “But I also have the feeling that we’re on the threshold of a new stage, one focused on the main driver of the modern age – digital innovation.”

The POLITICO Global Policy Lab is a collaborative journalism project seeking solutions to challenges faced by modern economies in an age of political disruption and technological transformation. To join the community, click here.