"On the other hand, I can't imagine the elves imprisoning spiders and goblins,
as opposed to killing them outright."
Maybe true about the spiders, but I'm not so sure about the goblins. In
Morgoth's Ring in one of the Orc essays, Tolkien says that although the Orcs
".. might have become irredeemable (at last by Elves and Men), but that they
remained within the law". For this reason if an Orc ever asked for mercy
good people were obliged, "even at a cost", to grant it to them. Perhaps
then the Elves of Mirkwood did imprison Goblins they captured in dungeons in
Thranduils
halls.