You can set the workshop to only allow certain dwarves to use it. You can even make a custom workshop to look like a lever, if you want.
If you really want to do things the hard way, though, you could set up a lever to cause magma to flow under a room (flow is important; still magma doesn't heat the room above it), and set the stone to evaporate at some temperature that's above room temperature but below room-with-magma-flow-underneath temperature.
I don't know if anyone's ‼scienced‼ the temperature of a room with magma flowing under it, though. (It's known that flow makes a difference because flowing magma will melt ice and snow but still magma won't.)
I was thinking magma might work to heat up from below. I suppose the easiest way would be to use a magma-proof floodgate and then use the liquid utility to create magma (at least I can make a magma flowing pipe to the room below) beneath the prison room and then just flick the switch to heat up the rock?
Hmm... an idea occurs. We know dwarves get hungry so would it be possible to make it so we have the following:
SsSS
SSFDf
S would be a "safe tile", the "s" would be stairs down to this level, a F is food* and "f" is a floodgate.
The idea is that we use the floodgate to control the limit. So, using that method above (they need to go past the syndrome-dangerous tile), could it be possible to make it so "you cross this floor tile, you get a disease"? I don't have a problem killing a dwarf or two to set up my rooms. Given that the dwarf in the prison will get hungry (I plan to use a drawbridge or a door + minning and cancelling it (as in tell him to mine the bottom floor, then when he's on that floor, lock the gate and cancel the minning operation), he will want to eat the food in the safe zone, but to do that he will trigger the danger tile and be hit with a diesase?