Denmark had an unfortunate situation about 13 years ago, where the only rail bridge to the northern part of the country was hit by a ship, cutting rail network in two. Some trains where stuck in the north and had to be ferried to Sweden and the take the trip down from Gotenburg, via Malmö and then across the bridge to Copenhagen, because those trains where needed to maintain the service level.

Since then I've been wary of dismantling too much backup infrastructure. The rail tracks to the ferry terminal was still in place in this case, because they are listed as NATO infrastructure, still they where barely maintained.

The tracks on the Gothenburg side have since been removed, so even this workaround would not be possible today (they would have to go to Trelleborg instead).

That's a fascinating bit of rail history

https://da.wikipedia.org/wiki/Jernbanebroen_over_Limfjorden#... See the 2012 collision, in Danish only, sorry.