If you look at their stock performance and management compensation the last 25 years, much of the responsibility seems to lie with the manufacturers themselves.

They had roughly two decades to adapt, but instead they often relied on strategies like pressuring German workers with the possibility of relocating production to Poland to keep wages down, while investing little in research and development during a period when sales were strong and new markets, such as China, were opening up.

There must be more to it. German automakers did belong to the top 10 (for some periods even top 5) R&D spenders world-wide. It seems they just did not spend it wisely. Similarly, the claim they "kept wages down" seems to require some nuance. VW workers are known to be very well paid. From the outside it seems like these companies became large behemoths who were not able to spend their R&D money wisely and their outsized pay packages forcing them to offer their products at uncompetitive prices.

As a university computer scientist, I saw our graduates hardly getting job in automotive directly while mechanical engineers got all the good jobs for years. Then about 10 years ago the opposite happened: people quit their PhDs because industry was hiring as many CS /AI people they could get. Industry understood that they needed to invest (even it was already a bit late). However, they IMHO failed to turn scale that talent into sustainable innovation. Many people I know left again automotive. I think industry struggled quite a bit to translate engineering leadership to a digital age in many parts. I think it was easier for pure EV manufacturers to embrace also other digital innovations.

Software need to interface almost all parts and electronics in a vehicle. Since car makers outsourced these parts, interfacing them took a lot of work. Here manufacturers like Tesla were clearly at an advantage since they controlled all components.

That is a nightmare situation for software that already started later in the development process.

There's not much more to it.

The internal EU market is bad (demand is low), the export markets are sensitive and competitive, and traditional Western companies are inefficient. (Which was okay as we were coasting on the post-WW2 globalization economic miracles.

But the inability and unwillingness to let the failing (uncompetitive) companies and industries go (France has a huge problem with this too) led to being stuck between a rock and an eventual hard place.