And most of that money (apart from the recently nationalised operators like Northern, ScotRail and LNER) goes back to the foreign-ran railways (Abellio/Netherlands, Amey/Keolis/France, Arriva/Germany).
Similarly in France there's a minimum percentage of social housing cities larger than X have to have, and some rich cities prefer paying the fine to actually building the required amounts of social housing.
Note that the Swiss railway is charged fines for lateness to be paid to the state - so while I wouldn't say it's impossible that they just went and decided to take these measures to prevent rail buckling proactively, it's just as likely that they did the cost vs. payoff math.
So yes, society did solve this problem by electing officials who put those clauses into the railway's operating license - but there are a lot of steps in there that shouldn't be overlooked.
- Start adjusting the tension on tracks starting in March when it gets warmer
- Use more expensive concrete sleepers where high forces appear (as TFA mentions)
- Cool exceptionally problematic parts of the track with water from tank cars
So in summary:
- spend money
- spend money
- spend money
That could explain why Network Rail isn't keen on doing any of that.
[0] https://company.sbb.ch/de/medien/dossier-medienschaffende/so...