(Bloomberg) -- Bosses at a steelmaker in northwest Germany have ripped out old-style lighting in favor of LEDs, tinkered to make machinery more efficient and even locked staff into classrooms to teach them how to save energy.

Across the nation, thousands of companies are doing the same to mitigate the hit from electricity costs that have doubled since 2016. These smaller, often family-run firms are collectively known as the Mittelstand and form crucial links in the supply chains for Germany's biggest firms, employing almost 20 million people and producing more in sales than Spain’s economy. 

When the Mittelstand suffers, Germany takes a knock. And yet it’s those smaller companies along with households that have borne the brunt of Chancellor Angela Merkel’s energy policy, which has imposed higher electric bills to pay for cutting pollution. While 2,000 corporate giants like Volkswagen AG and chemicals maker BASF SE have their own power plants and get exemptions from environmental tariffs, smaller companies pay more to absorb those costs.

“We’re constantly trying to improve energy efficiency,” said Klaus Schmidtke, a spokesman for Georgsmarienhuette GmbH, which employs 1,000 people and feeds steel parts into the supply chain of Volkswagen AG. “But to be blunt, we’ve not been able to offset rising electricity prices.”

Wholesale power rates on a tear across Europe, and apart from consuming less, there's little that companies can do about it. The surge can be traced back to jumping demand for generation fuels from coal in China to natural gas in Japan. And that globalization of the energy market is eating away at support for Merkel’s transition away from coal and toward clean energy.

Energy bills for the Mittelstand were surging even before’s this year's surge in the wholesale market. The companies, together households, had to cough up hundreds of billions of euros to pay for Merkel’s transition to an economy based on mainly solar and wind. That put them at a disadvantage against competitors from China to the U.S., as well as other European nations.

The subsidies for solar and wind projects as well as a raft of environmental taxes aimed at cutting emissions have made German electricity prices for residential and business consumers the highest in the European Union together with Denmark.

The rising costs have forced Mittelstand firms, almost all of which have sales of less than 1 million euros, to splash out on expensive, energy-efficient equipment and lock in prices with suppliers for several years ahead. Some are even starting to produce their own electricity, while others have shifted production abroad in a last-ditch effort to keep up with Chinese, South Korean and U.S. competitors who pay far less for electricity.

“The drag on competitiveness is particularly severe for small and middle-sized firms,” Eric Schweitzer, President of Germany’s Chambers of Commerce, said by email.

The rising electricity costs threaten to undermine support for Merkel’s Energiewende just as her government is seeking to make up lost ground on the faltering path toward its 2020 emissions-reduction targets. A study of the Mittelstand by DZ Bank found a third of their company leaders thought power prices were a threat to their business.

Rattled by the wholesale market, the Mittelstand are taking action. Some have hedged against higher energy costs by buying futures contracts for years ahead on the European Energy Exchange AG, said Wolfgang Hahn, founder of ECG-Consulting, which advises German companies on how to cut energy costs.

Others follow in the footsteps of the Osnabrueck steelworks by investing heavily in more-energy efficient machinery, lighting and training, Hahn said. About a third of companies have passed rising costs on to their customers, reducing demand for Made in Germany products, according to the Leipzig-branch of the Chambers of Commerce.

“The problem is often you don’t see results that quickly.” Hahn said. “Firms are getting extremely nervous that they can’t save money as quickly as prices rise.”

Germany’s lobby group for glass makers has advised members on how to save “every last kilowatt” of energy. Even so, all low-hanging fruit has already been picked, said Director General Johann Overath. “The industry is now producing at the limits of what is possible in terms of saving power.”

And if power prices continue to rise, many companies could be forced to close down, said Utz Tillmann, a spokesman for Energy Intensive Industries Germany, which represents the nation’s energy-intensive industries.

“That would destroy the tightly-bound supply chains for German industry,” he said.

Soaring prices are only the latest headache for the Mittelstand.

Germany’s domestic intelligence agency has repeatedly warned that Mittelstand firms’ valuable intellectual property has fallen prey to hackers, compelling firms to invest heavily in cyber security. Germany’s record-long economic boom has also led to a skills shortage of engineers, which means that companies must pay more to staff, further blunting their competitiveness.

Another threat: Beijing’s Made in China 2025 plan to help its own state-owned enterprises dominate the advanced manufacturing space is another.

Back in Lower Saxony, about an hour northwest from Osnabrueck where the small steelworks is trying to make ends meet, vegetables producer Gemuese Meyer has installed a wind turbine in one of its fields to supply its cooled storage units.

“We basically just wanted to sell vegetables,” said Laurenz Meyer, the owner. “But you can’t really be like that anymore today.”

To contact the authors of this story: William Wilkes in Frankfurt at wwilkes1@bloomberg.netBrian Parkin in Berlin at bparkin@bloomberg.net

To contact the editor responsible for this story: Reed Landberg at landberg@bloomberg.net, Lars Paulsson

©2018 Bloomberg L.P.