I think you may be right about the gibbet irons, they were for outdoor display. But our ancestors were surely less fussy than we are about smells, there were certainly lots of pungent aromas around in castles, and not only in the dungeons. Spending time living as a 'local', not a tourist, in a 'less developed' part of the world soon taught me to get used to smells!
Pits like John Doe shows in this image were standard - and can still be seen quite often - in the dungeons of Scottish castles, the stench from those, even when the wretches in them were still alive, must have been foul, but probably just part of everyday life.
View attachment 1107870