While was plotting the route for my summer migration, I was reminded of a realization I had during a previous move. It occurred to me that the optimal structure for a modernish narrative-style campaign is not that of a railroad, but rather of an interstate.
When you're planning a trip via interstate, you figure out where you are, where you want to end up, and any particular sites you want to stop at along the way. You get out on the road, and find things aren't quite as you hoped; there are traffic jams, police, road work, and detours. Not all of these interactions are negative, though - sometimes you get behind an 18-wheeler who knows exactly what's up with the traffic and is good at pushing people out of the way, and you can draft off of him for a while. Eventually, you realize there's something you need in order to keep going; gas, food, sleep, or bodily relief. Then you get into the interesting decision-making; this stop looks really sketchy, but the next one isn't for another 30 miles... will I run out of gas before I get there? Do I want to take the risks inherent in this stop, or the risks inherent in continuing without stopping? What if the next station is closed? Most of the time, we choose well enough, get what we need (maybe for a higher price than we'd hoped), and we eventually make it to our destination.
Contrast with the railroad experience. You get on the train, and it goes wherever it's going. You don't worry about getting resources, or making good time despite obstacles; you sit back, relax, and just let it roll. Eventually maybe you have to change trains, but that's fairly straightforward most of the time. Sometimes the train slows down and stops mysteriously, which is frustrating, but there's nothing you can do about it.
We've all seen campaigns that run like railroads, and many of us have seen sandboxes too... but I don't know that I've ever seen an interstate campaign compromise between the two. The real point there is to give the PCs some agency - you need a +n widget to fight the dragon. There are a couple ways you could go about getting a +n widget; there's rumored to be one in the Tomb of Terrors (risky, but probably workable), or you could try to get the dwarves to make you one (safe, but expensive), or you could try to steal the Lord of Argros' +n widget (dangerous, but gives the social and thiefy classes a good time). Let the PCs choose how they handle the rest stops, and how they circumvent obstacles. And maybe it turns out that the path they chose isn't viable; the rest stop is closed, the Lord of Argros' widget is a fake, and you're suddenly in trouble for trying to steal it. This stuff happens. Choices and actions have consequences... they can delay your arrival at the destination, and maybe imperil the trip as a whole. But likewise, a good choice may speed things up or make the end goal more likely ("Hey, we found a thing that may be useful for the final objective in the Tomb! Awesome!").
So next time you're thinking about running a railroad, look at what the PCs may need along the way, and try to provide them with a couple ways to get it; one risky, one expensive, and one really risky but quick and cheap.
As a personal aside and retrospective, it's kind of amazing how to me how far I've come since I had this idea. That was less than two years ago, and now I basically run and play in sandboxes as a matter of course, with little planned plot and lots of player agency. I think this may have been one of the first steps on my path towards sandboxing...