Breaking news: "Wind and solar overtake fossil fuels in <insert_European_country> for the first time" for the 10th time this year.
Also on other unrelated news German economy is rocketing to the bottom, their industry is dying with thousands of layoffs, closing factories, and complains on energy prices and they can't even maintain their rail and road networks for the first time since forever. The signs of decline are not even signs anymore they are bright neon signs. But at least we are taxing cows farting. While china is steamrolling ahead and we are regulated to death by bureaucrats.
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...
"Yes the planet got destroyed. But for a beautiful moment in time we created a lot of value for shareholders."
The continent is literally on fire due to global warming. Europe does not produce any fossil fuels and needs energy independence. It's because politicians dragged their feet for so long on net zero that we are even in this mess in the first place. Better now than never.