go look in the arms and equipment guide, there are a series of spikes which you hammer into a spot, and they are basically proximity mines with a big fireball or other energy ball when someone disturbs them or approaches within a few feet. they also turn invisible after being activated, iirc.
also, there is an arrow of cure light wounds in the master of the wild, iirc. painful way of healing, but it magically works. talk about smacking someone to take their mind off of their other wounds....
i believe the stronghold builders guidebook even specifically suggests healing "traps" that your stronghold defenders can use to cure themselves.
so you are not the first to think of this by a long shot. don't forget that healing chamber you described could have an extra trigger for detecting undead, and zap them too.
it is simply taking advantage of the mechanical ideas of traps and turning them to other uses. an example of advanced magical technology, i guess.