I did that, and tried to put some goblin cages of mine, but a swordman and a spearman goblin broke out of the cage when they were about to throw them into the pit! What's wrong?
I believe there is only a certain chance that prisoners break free. It may be that it is minimized by putting the goblin cage next to the pit. Maybe you could introduce some prison security procedures, airlock style entrances and crossbowdwarfs on towers for style, cage traps for efficiency.
If the cage is directly next to (north / south / east / west neighbor tile) the 1x1 pit opening, then you should never see issues with regular "captured prisoner" enemies escaping. Even thieves will rarely (20% chance?) break free if you setup your upper pit room correctly.
The issues of escape come into play if:
- It's a hostile animal (dwarf doing pitting can get scared)
- It's a thief (they break free all the time)
- The dwarf gets distracted and lets go during the transfer
- The pit is not a direct N/S/E/W neighbor to the cage location
Things I do to minimize escapes:
- One way in, lined with at least 2 rows of cage traps
- At least 5 military dwarves get stationed up top using "s" (squad) "m" (move)
- The pit is a minimum of 10Z and preferably a 12Z drop
Between the cage traps, smart layout and the squad or three of dwarves, nothing ever escapes the pit room of death. Or at least, not twice.