German reliability has, for a long time, been dependent on the model that you bought. They introduced the most cutting edge technologies in their top models, and high end customers were the test subjects. The base models were simpler and used only tested technologies.
At Mercedes, the small and mid sized cars were typically very reliable, and the S-Class was mechanically robust, but had lots of features that were more likely to break.
What you used to get when you bought a Mercedes was an engine, transmission, related driveline parts, suspension, and other major systems that outlasted, by a large margin, those sold by "lesser" brands. Back in the 70's, it was hard to buy a car that had an expected engine life of 300,000km, or much, much more. Mercedes "over engineered" the bottom-ends of their engines to the point that if you changed the oil and filter on a somewhat regular basis, the engine would last virtually forever. The old single cam sixes as used in the W124 300E models would require some minor head work (valve seals), but otherwise would last well over 500K. My 190E 2.6 used a version of the same driveline, and at 510K, the engine was strong, the transmission still good, and so on.
But, the Japanese cottoned on. They started selling less expensive cars that would easily last as long as 99% of consumers wanted to keep their cars. The paid close attention to electronic reliability. They either built things themselves, or demanded suppliers build good parts. In Germany, ZF, VDO, Bosch and Hirshmann, just to name some, built JUNK for various car makers. For years and years every MB owner knew their cruise control (VDO) would stop working, their power antenna would crap out (Hirsmann) and their radio (Bosch) would quit long before the first brake pads were swapped out. BMW owners were subjected to rotten ZF automatic transmissions. No Japanese company would have tolerated repeated low quality parts from suppliers.
Toyota showed that you could build a flagship car with a lot of features that would be reliable. The 1990 Lexus LS400 was the cruise missile that left a lot of German makers wondering what had hit them. But, did they really wake up? Not completely...