jhm, we seem to be on the same page.
Used to be, in Grampa's time, that government ran all (well, almost all) railroad from sleepers to conductors. "Statens Järnvägar, SJ".
Then it was split up so a division of govmt got responsibility for rails, signals, etc (Banverket), while a number of operators got to run traffic where they put in the lowest bid, for a limited time, with leased rolling stock. Since other needs were more pressing, Banverket had insufficient funding from govmt budget to actually keep the lines reliably open, especially when winter turned out to bring snow and ice blocking switches, or summer heat made sun curves and power lines sagged and started brush fires. And of course, the temporary operators saw no pressing need to maintain the hired trains, so wheels tended to be not quite round and beat up the rails for all.
Even as some lines were being built out, thieves stole tons of copper so neither power nor signals were reliable and no trains could run; the investment was useless.
So, the great populace decided it was too much trouble to chance a train and took a bus or went by car or flew instead. Which increased the financial pressure on operators to only bid on the most lucrative connections between the biggest cities (and also complicated buying tickets from multiple vendors with byzantine pricing).
In short, the Tragedy of the Commons.
And I am not a Socialist! Actually, the former Chairman of SJ, Ulf Adelsohn who used to be the leader of the Conservative party, resigned over this fiasco -- he saw it coming.
Back on topic: Stationary Power Storage, Solar and other local renewable distributed generation and power management have a very bright future, in my view. And Tesla is at least one lap ahead.