Just thinking out loud here.
I was watching one of those prepper shows the other night, you know the ones where people think there will come a time when society collapses due to a natural or man made event and they “bug out” in order to survive… Well one of the things someone was prepping for was a solar flare which could knock out all manner of electronic devices and send us back to the 1800’s. An electro magnetic pulse could do the same.
Imagine if we were hit by a solar flare that did fry everything that contained electronics including diesel train engines. Once the panic calmed down freight would still need to be moved and firing up old steam trains would be a way to do it. I think that would be pretty neat but not having electricity not so good.