It is a railroad, the question is how long do the players need to stay on the track. I believe it is an acceptable practice for players that are new to the game, and that is the overall focus of 5E. But on the other hand, it will be offensive to others (probably more experienced players).
The only question I would offer, is could they have done a better job of offering the illusion of choice, yet still present options that would eventually lead to the players being captured, or caught behind a rock and a hard place. I believe overall that type of experience is more rewarding, but there is a small chance the group will overcome any odds at all costs. And those are the stories we remember.