SCHROBENHAUSEN, Germany (Reuters) - Bauer, a big producer of construction equipment, is better placed than many German companies that invested heavily in China over the past few decades.

The Bavaria-based firm, which traces its roots back to 1790, does not have to worry about keeping a Chinese joint venture partner happy because it is the sole owner of its two plants in Shanghai and Tianjin.

And the specialist engineering machines Bauer produces there are sold in countries across Asia, shielding the group from swings in the volatile Chinese building market.

Even so, CEO Thomas Bauer, the seventh generation in his family to run the firm, is worried about his company’s place in China and a broader economic relationship that until recently was seen by German corporations and politicians as a lucrative one-way bet.

“Germany has put too many eggs into one basket, and that basket is China,” Bauer, a jovial 62-year-old with a thick Bavarian accent, told Reuters at the company’s headquarters in Schrobenhausen, an hour’s drive north of Munich.

Bauer's BSAG.DE concern points to a growing fear in Germany. For more than a decade, the country has been the growth locomotive of Europe, its economy weathering global financial turmoil, the euro zone debt crisis and a record influx of refugees.

That resilience was based on two key drivers: Germany had innovative firms that produced high-end manufactured goods that fast-growing economies needed; and the country was better than others at profiting from an open, rules-based global trading system that rewarded competitiveness.

China has been crucial on both fronts. Over the past decade it bought up German cars and machinery at an astonishing pace, as it gradually opened up to foreign firms. Last year alone, German manufacturers sold nearly 5 million cars in China, more than three times as many as in the United States.

But even as the good times roll on, a radical shift is taking place in how Deutschland AG views the vast Chinese market.

Not only has the opening of China shifted into reverse under President Xi Jinping, but Chinese firms have moved up the value chain far faster than many in Germany expected.

Germany’s China conundrum is part of a broader challenge facing Europe: Years of inward-focused crisis fighting have left the bloc politically divided and ill-prepared to respond to looming geopolitical and economic challenges. Now the continent risks being squeezed between a more assertive Beijing and the “America First” policies of Donald Trump.

In private, some executives liken the situation of German industry in China to the proverbial frog in a pot of slowly heating water which ends up boiling to death because it won’t or can’t jump out.

Germany’s ambassador to China, Michael Clauss, warned at a meeting with industry chiefs in Berlin last month of “tectonic changes” in the relationship, according to participants.

Slideshow ( 8 images )

“We need to prepare people here for a new era in our partnership with China,” an official at Germany’s powerful BDI industry federation said. “These are still golden times. But there is a huge amount of concern about what lies ahead.”

(GRAPHIC: Germany's China problem - tmsnrt.rs/2GUN6BK)

ROLE OF THE STATE

German companies were among the first in the West to set up shop in China, giving Germany an advantage as the Chinese economy took off.

Bilateral trade between the two countries hit a record 187 billion euros last year, dwarfing China’s trade with France and the UK, both around 70 billion. In 2017, Germany ran a trade deficit with China of 14 billion euros, tiny compared to the U.S. deficit of $375 billion, or about 346 billion euros.

Bauer AG, which employs 11,000 workers in 70 countries, built its first production facilities in China in the mid-1990s. At the time, not a single Chinese firm could make the sophisticated drilling machines it produces – towering yellow structures used to build the foundations for skyscrapers, power stations and airports.

By 2013 Bauer counted 36 Chinese competitors able to make such machines, a shift the CEO says was accelerated by European suppliers selling co-designed parts to the Chinese.

A decade ago, the company’s Chinese plants generated revenues of 109 million euros. Sales slumped to less than half that amount in five of the nine years that followed.

Today, what Bauer and other German firms say they are most worried about is the role of the Chinese state in the economy.

Last year, China introduced a cyber security law which tightened state control over internet services, including secure VPN connections that are used by foreign firms to communicate confidentially with headquarters. More recently, some German companies have complained of pressure to accept Communist party officials on the boards of their joint ventures.

The Bauer boss fears that Xi’s “Made in China 2025” strategy, which identifies 10 key sectors – including robotics, aerospace and clean-energy cars – where China wants to be a leader, represents a direct challenge to German manufacturing dominance.

To keep its edge Bauer says his firm is focusing intensively on digitalization.

Slideshow ( 8 images )

“It will not be a contest against copiers. It will be one against innovative engineers who are intent on overtaking us,” he said. “If we don’t start finding answers soon, this can end very badly.”

TRUMP TARIFFS

The German angst over China mirrors that which has prompted Trump to threaten Beijing with tens of billions of dollars in trade tariffs.

But because Germany’s top firms have become so dependent on the Chinese market, the government in Berlin has avoided confronting China head-on.

Back in February, carmaker Daimler DAIGn.DE showed just how skittish some companies are about upsetting Beijing.

After a backlash in China over a Mercedez-Benz ad on Instagram that quoted the Dalai Lama – the Tibetan spiritual leader seen by Beijing as a separatist – Daimler deleted the post and its CEO Dieter Zetsche wrote a letter expressing deep regret for the “hurt and grief” his company’s “negligent and insensitive mistake” had caused the Chinese people.

“There is a huge gap between what people in Germany are saying about China and what they are really thinking,” said Bernhard Bartsch of the Bertelsmann Foundation, a German research group.

Later this month, Bertelsmann and Berlin-based China think tank MERICS will host an Oxford Union-style debate on the motion: “In ten years’ time, China will have substantially undermined Europe’s political and economic system”

The mood among German firms operating in China is also souring.

A survey late last year from the German Chamber of Commerce in China showed that for the first time in many years, more than half of its members were not planning investments in new locations in China. Nearly 13 percent of German firms operating in China said they could leave within the next two years.

For decades, Germany’s approach to China could be summed up with the motto “Wandel durch Handel” (change through trade).

Now that strategy is in tatters and government officials joke darkly that the “win-win” relationship has a new meaning: China wins twice.

“The hope was that closer economic ties would lead to an opening. Today it is clear this was a false hope,” said a German government official. “They tell us what we want to hear and then do the opposite.”

Berlin is starting to push back. Last year, after Chinese firm Midea's 000333.SZ takeover of robotics maker Kuka KU2G.DE sparked an uproar, it tightened restrictions on foreign investments and launched a push for new Europe-wide rules for screening takeovers.

In December, Germany’s domestic intelligence agency infuriated Beijing when it accused Chinese counterparts of using fake social media accounts to gather information on German politicians - a rare public rebuke that Berlin says was intended to send the Chinese a message.

A summit between the German and Chinese governments later this year is likely to reveal a tougher line from Berlin, officials say.

But they also concede that divisions within the EU and a wide gap between Europe and the go-it-alone Trump administration will make it more difficult to force change in Beijing.

“What the Chinese are really worried about is Europe and the United States working together against them,” said the German official. “In that sense, Trump really is a gift to China.”