I am curious, how many hear have been in railroad campaigns they enjoyed?
I have run two games that were either railroads or close to them.
The first was a disaster and the only time I've had my players lose interest in a game. This was in the late 80s/early 90s and I'd kind of written an Ultima IV style epic quest. Ugh. I learned a lot from that.
Then a couple of years ago I talked to my group about running a low magic setting with more plot than usual. A big feature of it was that the elves were gone- nobody knew what had happened to them- and "elfbloods" (mechanically half-elves) were anywhere from about 1/3 to 1/16 elf. It ran in two arcs, the first of which was fairly sandboxy with a good amount of political intrigue and treachery and lots of hints about the overall plot line. The last session I set up so that it would be
just shy of a railroad- I needed to break one of the main rules of good dming to pull it off ("never count on capturing the party") and one of the pcs got away, but I managed to integrate in my planned "last minute npc arrives, reveals she is an elf and helps save the pcs from death while the bad guy gets away through the mysterious portal that his ritual has created" scene.
It went off GREAT. I think a lot of it was because, rather than forcing the pcs to jump on the rails, I had spent many games setting things up to encourage them to
want to get to that station. Instead of being prescriptive, I tried to be predictive, and because I know my players really well it went perfectly. Another big element that helped was the fact that only the very end was like this.
Then, when we came back to it for the second arc, the pcs were on a much stronger railroad. Ultimately, not following the bad guy would lead them into the middle of the apocalypse that made the setting low-magic. There was a living epic spell called the Elf-Slayer of Vardoth that was CR 157 and was committing genocide in one direction, a demonflame zone in another, etc. The pcs could have wandered off into these areas and likely died, but they might have found a way to stay alive. Who knows... but they all were hot to chase the bad guy anyway, even if the surrounding areas weren't lethal.
The second arc of the campaign had an area detailed that covered the zone the enemy would travel to his destination. It was predetermined that the pcs wouldn't catch up to him until the end; there were several planned encounters along the way that would happen wherever they went. There were sandbox elements, though; some choices about the route they were taking could lead to their choice of messed up mid-apocalyptic zone.
Though I'd predetermined where the pcs would catch up with their arch-nemesis, I had not decided what the outcome would be. That was for the dice. So the train took them to the station, but once there it was up to them what to do.
That campaign was very satisfying for all of us. Again, being predictive let me preserve the players' sense of autonomy while keeping them on the tracks.
There are so many bits of that that are totally against my normal dming philosophy that it's ridiculous.

But like I said, it worked, everyone loved it and we had a blast.