There are a few ways to "not railroad" and get that result:
1. Player buy-in, the player's like the idea, and are willing to take a risk that'd normally= death, knowing that if they fail they'll just end up enslaved instead.
2. Player prophecy-fudging; the player's take the idea and run with it. Sure, it looked like they were being enslaved but really they'd engineered their position there, in order to overthrow the slavers
3. Wait for your chance: it might take a while, but at some point the players are going to be in a position where they can get captured.
Combinations of those, and other options, are possibilities. They all require some degree of player buy-in, but so does playing an RPG in the first place.
It may be possible to do the opening scene and then rewind to let the players see how they got there, without doing "bad railroading".
However, I'm concerned that it creates a greater potential for "bad railroading". Just as writing "in this encounter, the elven patrol will take the party prisoner, and then march them to see the chieftain" increases the likelyhood that the GM will try to force a capture and willfully obstruct any valid solution to prevent capture.
This is one of the reasons why I advise new DMs to avoid trying to capture the party. Because it can lead to bad GMing. Despite the fact that capture is a decent solution to not killing a PC. It's a fine line of when it's useful, and when it's dangerous.
I've mentioned this in another thread, but I wonder if perhaps there should be considered GM Rules of Engagement, on what's fair technique for a GM. Perhapps the list may vary from table to table.
for instance, Celebrim listed a bunch of very good examples of "bad railroading" instances. However, one I disagreed with was the "all roads lead to Rome", though his phrasing was different, and I think there are 2 different varieties of it.
In the bad version, if the BBEG is in the east, and the party knows it and heads west (presumably to avoid him), the BBEG should not be waiting in the west when they get there. That's bad "All Roads Lead to Rome" usage because the GM is thwarting player intent.
If the players have a choice between walking to EastVille and WestVille, and an NPC with a new plothook was written as "drinking in the EastVille Inn, bemoaning his plight" and the players go to WestVille (unaware of any of this), then it is perfectly acceptable to move the NPC to the WestVille Inn, so you can still use the plothook. This is simply reusing material, not willfull obstruction.
the real point is when the GM reads the notes on the adventure, they don't interpret it as a literal program. If they see the encounter says "the elven patrol will capture the party", they interpret it as "the elven patrol will TRY to capture the party". If he reads "Bob the new NPC is sitting in EastVille Inn with a plot hook", he can interpret it as "Bob the new NPC is sitting at the NEXT Inn the party arrives at."
The gist is, some game elements are allowed to float, and be moved to where they will be useful, rather than wasted as content the party never sees. Other game elements can't float, as they are very much tied to what the PCs know and decide to do.