I have run adventures where I captured / purposely kill the PC twice. Each time, it bit me.
The first was when I was running a Ground-Hog day style event. I wanted the first day of the loop to be brutal. I killed a PC and had two others captured by the bad guys. This was a total mistake. The players flipped out. From the point of view of the players, I, the GM, presented a brutal situation that was best avoided. I learned a lesson that day about presenting fights that can't be won without proper warning.
The second time I planned on capturing a single PC. This was a plot point as I wanted that PC to see something the bad guys had captured. The PC didn't flip out, but afterward, told me he felt rail-roaded into the situation.
In both cases, I did a very poor job of managing PC expectations. The second case would have been easy to avoid: tell the PC involved that I was planning on capturing his character as a plot point. At that point, the player probably would have actively participated in his capture instead of feeling rail-roaded into it.
The first case is trickier. If I was going to run that adventure again, I don't think I'd have the brutal fight in the ground hog day adventure. I warned the players before hand that they needed to trust me. Regardless, pulling that kind of stunt (even with the warning) is tough to do.
If you are going to run an escape adventure, I'd start with in medias res to help manage player expectation.
Encounter 1: Jailed
Open with some subset of the PCs already captured and in a cell. These are the ones you know will get caught. It also lets the PCs know that they are going to be captured as part of the plot.
Encounter 2: Hired
Flashback - The PCs are hired to do whatever job that is going to lead to their capture. The players know what is up, so you can play with details of their imprisonment. Perhaps the captured PCs see someone wearing very distinguished armor, now they see that same suit of armor in the mansion of Mr. Moneybags. What's going on here? Are the PCs going to be betrayed from within? Did Mr. Moneybags set them up? This can breed some very fun paranoia
Encounter 3: Captured
Flashback - The PCs are captured. Make sure you hunt down the ones that are present in Encounter 1. The rest could have gotten away, if not, they are being stored in another cell that the first group couldn't see. If you are very clever, you can come up with some reason (or steal some reason from the players) as to why the missing PCs aren't with the main group.
Encounter 4+: Escape and Resolution
Now you can let your PCs come up with a brilliant plan to escape, or allow those that manage to escape to track and rescue those who have been captured.