Your cause/effect doesn't have all that much truth to it with regards to rail.
German rail has been an under-invested in mess since reunification, it's a long slide not a recent one. They are finally investing the kind of amounts in it they need to, to actually revive it to what it should be. It's going to be a long road to actually get there, of course.
Paywall but a decent read on that note: https://www.ft.com/content/db75e347-b13b-4753-8130-6301bb55c...