Demons avoid *regular* traps, i.e. ones that trigger when a critter walks over them. However, spike/spear traps can and will harm demons if you catch them while they're on the tiles. The spikes/spears should be fire proof if you're dealing with !!HFS!!. !!HFS!! is hot enough to burn up mechanisms, so the traps will break eventually no matter what, but this ensures you don't claim total victory over the Pits and then burn the fortress to the ground anyway because a dwarf decided to carry a stack of !!spears!! back to your stockpiles.
The doors, of course, will get ripped up no matter what kind of HFS you're talking about, but they will serve to slow down the monsters, giving you both warning and time to send someone to pull the trap lever.
Spears are great for arming the traps - if you're training up a weaponsmith, you can just have him make spears all the time and put the low-quality ones in the traps. If you're short on metal but have magma and sand, green glass is a good source of cheap, fire-proof trap components. If you put 10 components in a trap, it doesn't matter if they're made of steel or glass or wadded tissue paper, whatever stands there is going to die.
Water + magma is also a good way to annihilate demons, but remember that you might get steam instead of obsidian if you don't drop enough water. You'll want to make sure there's several full squares of water held above the magma trap for each single square of magma. I'm not sure if !!HFS!! radiates enough heat vertically that it would be able to vaporize the water through the floor hatches above, but it's possible. Remember that !!HFS!! flies, and if the magma trap fails to encase them in obsidian, they can fly right up the water channel, vaporizing all the water along the way, and snack on !!dwarf chunks!! at the other end unless you're careful.
So be careful. No pressure! =)