ÖHRINGEN, Germany — Öhringen lies deep in automaking country, homeland of Germany’s biggest industry and a source of national pride. And by most appearances, life is pretty good.
The unemployment rate in Öhringen is a mere 2.3 percent. Restaurants, nursing homes and kindergartens are begging for workers. The city government is using bulging tax receipts to build a new secondary school and a hospital.
But just outside Öhringen’s tidy old quarter, dominated by the steeple of a 15th-century stone church, there are signs that the economic upswing that has nourished this idyll is beginning to falter.
A factory that makes air filters is closing, putting 240 people out of work. The plant, owned by Mahle, an auto parts manufacturer based in nearby Stuttgart, is a victim of forces that are reshaping the auto industry and threatening the foundation of the German economy.
Global car sales are declining at the same time that companies are pouring billions of dollars into new technologies like autonomous driving and electric cars, which are easier to assemble and require fewer workers and fewer parts.
Carmakers, including Daimler and Volkswagen’s Audi division, as well as suppliers like Continental and Bosch, have announced tens of thousands of job cuts in recent weeks. German auto production will be at a 22-year low in 2019 and 2020, according to calculations by Ferdinand Dudenhöffer, a professor at the University of Duisburg-Essen.
Workers are feeling the brunt, and not just in Germany. The upheaval in auto technology was an undercurrent in the United Automobile Workers’ recent strike against General Motors, with G.M. aiming for flexibility in staffing levels as it devotes more resources to electric vehicles.
“For Mahle — and for the industry as a whole — the technological transformation is a monumental task,” said Jörg Stratmann, the company’s chief executive. It means, he said in a statement, “cutting our costs and making tough decisions.”
There is a gnawing feeling that something more fundamental is going on in Germany’s powerful auto industry, which employs 835,000 people, than just another economic cycle.
The growing popularity of electric vehicles could force a shift in the balance of power in the global car business that would have long-term consequences for Germany.
So far, sales of electric cars make up a small share of the overall auto market, but they are growing fast. In October, battery-powered cars and hybrids accounted for almost 10 percent of new car registrations in Europe, according to JATO, a market research firm; figures from another firm, LMC Automotive, put the share at less than 4 percent in the United States. Sales of those cars in Europe were up 40 percent from a year earlier in an otherwise stagnant market.
If the trend continues, it spells trouble for the hundreds of suppliers that make parts for internal combustion engines. The Mahle factory in Öhringen makes equipment that controls the flow of air in diesel and gasoline motors.
“There is a transition toward more electric vehicles that have far fewer components and are easier to manufacture,” Bernhard Mattes, the president of the German Association of the Automotive Industry, said in an interview in Berlin. “Therefore, we can expect less employment.”
Mr. Mattes, former head of Ford’s operations in Germany, quoted studies estimating that a shift to electric cars could cost 70,000 jobs in Germany by 2030. Some estimates are higher.
The effect of those cuts may be felt most acutely in communities like Öhringen, where the local economy revolves around small and midsize manufacturers, often serving the auto industry. Audi, Porsche and Daimler all have factories within a 40-mile radius.
Faced with flat or declining sales in their major markets, the big automakers are expected to pass much of the pain on to suppliers. The carmakers will demand lower prices and begin taking over work that they would have previously delegated to contractors.
Thilo Michler, the mayor of Öhringen, said the local economy was diverse enough to survive the closing of the Mahle plant. The city, with about 25,000 residents, is also the home of other midsize companies such as Huber Packaging, the world’s largest manufacturer of five-liter beer kegs.
“Mahle is painful, but it’s manageable,” Mr. Michler said.
Unemployment is so low that most Mahle workers will probably find new jobs by the time the plant ceases operations by the end of 2020. But they will have trouble finding work that pays as well, and may have to accept temporary contracts that offer little job security, said Rüdiger Bresien, an official of the IG Metall union who represents workers in the area.
Mr. Bresien said job losses from upheaval in the car industry were bigger than they seemed, with companies quietly letting go of workers on temporary contracts.
“In a lot of firms, we see that temp work is going down a lot,” Mr. Bresien said. “But you don’t hear so much about that.”
He said he worried that frustrated workers would be drawn to the far-right, anti-immigrant Alternative for Germany party. In elections for the European Parliament in May, the populist party scored 10 percent of the vote in the state of Baden-Württemberg, which includes Öhringen.
“There is always a risk that people ask, ‘Who’s at fault?’ and ‘Who’s going to help me?’” Mr. Bresien said.
The gently rolling countryside around Öhringen is dotted with factories carrying the logos of companies that may not be household names but often dominate their niche markets. Such companies are a big reason for Germany’s economic success.
Just down the autobahn, for example, is Ziehl-Abegg, a maker of industrial fans that has more than 4,000 employees worldwide.
Owned by a grandson of the inventor who founded the company in 1910, Ziehl-Abegg has achieved soaring sales over the last decade. But this year, sales were flat, reflecting a broader decline in German industrial production.
Germany narrowly avoided recession this year, but German factory output has been declining since the beginning of 2018. The trade war has hit even companies like Ziehl-Abegg that are not dependent solely on the auto industry. More than three-quarters of Ziehl-Abegg’s products are exported.
Ziehl-Abegg is among companies trying to adjust to the shift in automotive technology by using its expertise in electric motors. The company sells a propulsion unit for buses that embeds the electric drive inside the wheel. Ziehl-Abegg says the so-called axle-drive module saves energy because there is no need for a gearbox, which reduces friction.
But the axle drive also illustrates the danger that electric technology presents to the German auto industry. More than a century of expertise in internal combustion engines and transmissions could become irrelevant. German car companies typically build their own motors, but almost all of Europe’s battery cells, which account for a large share of an electric car’s cost, are imported from Asia.
The risk for the established German carmakers is that they will cling too long to old technologies and be overrun by new companies that focus exclusively on electric vehicles. Those include Tesla, which has announced plans to build a factory in Berlin, and Eurabus, a company in Berlin that makes battery-powered buses.
Ziehl-Abegg’s axle-drive module is being used by companies that make sightseeing buses, airport shuttles and other specialized vehicles. But Ralf Arnold, managing director of Ziehl-Abegg’s automotive division, said it had been difficult to win over major bus makers like Daimler or MAN, a unit of Volkswagen.
“What’s still missing is one of the big players,” Mr. Arnold said at Ziehl-Abegg’s headquarters in Kupferzell, about 12 miles east of Öhringen. “They are very cautious. They live in their own world.”