"Four years ago, there were only two of us," said Julia Wimmer of her team that maintains machines producing electric motors and battery packs in the Dingolfing factory. "Now we're between 25 to 30."

Battery-pack production uses robots to perform diagnostics and remove traces of dirt before placing each cell into the metal casing, a process that is obviously simpler and less labor-intensive. The cells arrive at Dingolfing in cardboard boxes from Samsung factories in South Korea.

In this small town northeast of Munich, generations of BMW workers have flocked into the giant halls each day since the factory opened in 1967. A straightforward economic arrangement has endured: Workers come through the gates to build cars, the company provides the comfort of security and bonus payments, and everyone maintains a lustrous reputation for excellence.

That was the promise that brought Thomas Datzer to Dingolfing as an electrician apprentice in 2003. The slim thirtysomething assembled cars before rising to a supervisory role. He worked on the electric BMW 1 series ActiveE concept car in 2009, and that powerful but silent test drive helped spark a return to his electrician roots. Now Datzer is a master of battery assembly, a highly prized qualification.

The battery cells Datzer oversees for BMW's electric cars, like those of most other automakers, are imported from Asia. LG Chem, Samsung, Panasonic, and China's Contemporary Amperex Technology, or CATL, are by far the largest suppliers of batteries in the world--and that is unlikely to change anytime soon.

Germany and France have pledged a combined 1.7 billion euros in subsidies to co-finance battery research and build factories in their respective countries, but the plan is still in the discussion stages. CATL is building a plant in eastern Germany to supply BMW, and South Korea's LG Chem has started output in Poland.

Automakers appear to see less reason to specialize in battery cell production, with capacity ample and the cells themselves lacking in the potential for differentiation. Few consumers, at least at this point, seem interested in being sold on the "ultimate battery machine."

China's plans to foster homegrown battery giants and dominate the growing industry has not seemed to rattle automakers, even as the outcome becomes clear: Germany will not dominate this key part inside the world's next wave of cars.

The auto industry that developed over the 140 years since the invention of the combustion engine has become Germany's biggest employer, with 834,500 workers in total, and now accounts for a fifth of all German exports. BMW, Audi, and Mercedes produce 8 out of 10 premium cars sold each year, and Volkswagen's position as the world's biggest automaker cements national strength within the global industry. The dense cluster of automakers and suppliers inside Germany is a direct consequence of the nation's head start as the birthplace of modern combustion.

It was Nikolaus Otto who, together with Gottlieb Daimler and Wilhelm Maybach, patented the first modern four-cycle motor in 1876. Internal combustion happens in a much more compact space than that of the steam engines that had jump-started Europe's industrialization.

Made in Germany

While Germany had invented the heart of the car by the dawn of the 20th century, it was not clear from the start that the combustion engine would dominate. Ferdinand Porsche's first design for a car, created in 1898 when he was a 22-year-old engineer working for someone else, called for electric power. Porsche himself drove the vehicle in a 24-mile race for electric cars held in 1899--and he won by 18 minutes.

By 1948, when Porsche founded his own automaker, combustion engines had won out. The first electric vehicle produced by his namesake company, the Porsche Taycan, will not be available until the end of this year.

The sudden urgency among giant automakers to painfully prepare for the post-combustion era is being driven more by global regulators than demand. China, by far the biggest single market for EVs, has used a mixture of powerful regulations and subsidies to spur automakers to produce battery-powered cars--and force drivers to purchase them.

To keep up with tightening targets on CO2 reduction in Europe, Volkswagen has been accelerating the industry's biggest electric-car rollout in an effort to make up 40 percent of sales by 2030. Last year, however, that number was less than 1 percent, even with plug-in hybrids included in the total.

Three VW plants in Germany are set to retool to only make battery cars. The cost of transforming just one plant over the next two years? At least 1.2 billion euros.

BMW has not yet decreed that any of its factories will become entirely electric. The idea for now appears to be to ride out the transformation making electric vehicles on the same production line as combustion cars, because of the luxury automaker's smaller scale. Employees at the headquarters factory in Munich are currently preparing to make a new electric vehicle, dubbed the i4. "For a long time, we'll be doing both combustion-engine cars and EVs," said Milagros Caina Carreiro-Andree, the BMW board member who oversees human resources.

In the engine factories, where workers assemble many parts by hand, automation and efficiency gains have already seen the number of workers slip in recent years, even before BMW moves into a full line of electric vehicles. "If that technology shrinks, then all we have is the surface we're occupying," said Norbert Duermeier, a labor representative at BMW's engine factory in Munich, across the road from its emblematic headquarters shaped to resemble a four-cylinder engine.

Nation of car builders

The German automaker turns out 16 different engines with hundreds of variants at four factories populated by some 9,000 engine-assembly workers--and its empire of internal combustion stretches far beyond that. There are parts-manufacturing jobs inside the company and employees who purchase scores of engine components from elsewhere.

Uncounted workers at those hundreds of suppliers, in Germany and elsewhere, play a role in producing the engine. So, too, do employees involved in the complicated engine tests required by regulators.

Peter Cammerer, another BMW labor representative at the Munich factory, expects engine developers to feel the hit even earlier than assembly workers as automakers shift funds from combustion to electric technology. He foresees few of the mechanical engineers who now work on pushing motors to the next level making the switch into jobs of the future.

This story will play out across nations that have specialized in auto manufacturing, but perhaps nowhere more acutely than Germany. In the past decade through 2017, according to Accenture, carmaking accounted for 60 percent of revenue growth at Germany's top 50 companies. That means the end of internal combustion, combined with a decline in worldwide car ownership, could bring about an overhaul of the world's fourth-biggest economy.

A joint study by Germany's powerful IG Metall union and the respected Fraunhofer Institute for Industrial Engineering concluded that 75,000 of 210,000 positions across Germany in engines and transmissions will be obsolete by 2030, even as electrification will create about 25,000 jobs in that time frame.

Unions in the U.S. have reached similar conclusions. A research paper published last year by the United Autoworkers warned that demand for electric-vehicle components "could shift business and employment to non-auto companies that lack a large U.S. manufacturing base. This could undermine auto job quality."

Volkswagen has already announced that the updated line of gasoline and diesel engines it plans to introduce in 2026 will be the last. The automaker had agreed with workers in 2016 to eliminate 30,000 positions and may seek more cuts. "I'm convinced we must modernize ourselves much faster," CEO Herbert Diess told workers last month at a town-hall meeting in Wolfsburg, Germany.

Investors are already voting with their feet. Tesla's market capitalization now equals that of BMW, even as the German company made 10 times more cars last year. Volkswagen trades at a valuation that's sunk to around a third of other European companies in the consumer-discretionary sector. Taken together, the German auto sector had revenue of 423 billion euros last year, nearly double what the mechanical engineering sector brought in, Germany's other manufacturing mainstay.

The shift away from combustion engines will undoubtedly have a far-reaching impact for Germany's suppliers, the biggest of whom are global players in their own right. More than 70 percent of the value-add of a car made in Germany comes from this supply network. A few German suppliers, including Bosch and Schaeffler, are already cutting jobs. Others are embarking on wholesale strategic shifts such as a powertrain spinoff at Continental and transmission-maker ZF Friedrichshafen beefing up its electronics capability by acquiring Wabco Holdings in a $7 billion deal.

BMW has not been willing to forecast how many jobs might be lost, but the company's human resources department acknowledges that making an electric motor takes roughly 30 percent less time than a gasoline-powered engine. "The numbers of hours worked to make an electric motor are smaller than for a combustion engine," said Carreiro-Andree, the BMW board member. "That's a fact."