I'd be very careful with this. You say that you don't want it to be railroading, but the fact that you've already decided the encounter's outcome ahead of time means that it is. Players tend to react badly having characters captured, especially if they feel like the deck was purposely stacked against them (I speak from experience.)
If you really want the campaign story-arc to involve the players being captured, I'd suggest getting player buy-in on the idea, and not use game mechanics at all.
I don't see how this is railroading. They have distinct options in this scenario. They can always join their foe, as he said.
They can also always run. Of course, 99% of all D&D parties never, ever consider this as a remote option or necessity.