So you have cage traps in your entrances, and now have a stockpile of thieves to dispose of. Why not "question" them for information? Successful interrogations will give information on things such as when and from where the next siege/ambush will come, how many will come, what kinds of weapons they will attack with. If successful, the game will warn you in advance if an ambush is expected or if a siege is imminent.
There can be more than one way to interrogate the prisoner. It can be done cruelly or kindly, depending on your assigned torturers' personality and social skills. Kindly involves feeding the prisoner your masterwork tallow roasts and showing him around your tastefully arranged statues, getting the prisoner to ecstatic and friendly enough to divulge the information. Cruelly involves physical and psychological torture to make him miserable, such as sleep deprivation by engraving near him or just a few hours on a torture bench. Extra points for being near scary things like a caged giant mosquito or over a pool of magma. Time may be important; too long and the information is no longer relevant.
Prisoner Exchanges should also be available. So you captured 10 goblins, but what do you do besides execute them? Why, engage in a bit of diplomacy! You want Urist Whinestone back, so you can trade 3 goblins for your stolen child; you may see those 3 goblins in the next siege though. Or you can trade 20 prisoners in exchange for a temporary truce for a year (which they may break, unless you still have more goblins they want). Anything to involve diplomacy and social skills, so your nobles aren't worthless.
Capturing creatures with the military. Soldiers can be equipped with ropes or nets to try and capture creatures/goblins, where they then drag the captive to a built cage. Squads can be assigned to attempt to capture a creature rather than kill. Some weapons can also be used to help; new weapons like batons or sock-bricks. Capturing is of course harder than just killing.
Maybe I'm overthinking this. I just want to do something with prisoners besides executing them.