After reading this thread I have spent whole evening to save the dwarf.
Damge him and heal over and over again. (No need for Living On The Edge - I dont use it, and had no money to try it, neither % loss will not trigger demon)
There will be dialog which will inform you about deamon coming out. (You will learn after few fails)
Best would be he stays down the pit. Keep him knocked down or stunned otherwise he will escape (Nether swap) and you will have to teleport him down.
When the time comes dwarf needs to have some HP so fight him longer to reset cooldown on heals.
Now key to victory is to run away from room. Job must be done by your minions.
In my case each team member can summon Bone Widow but most job did Incarnate with Power,Shadow and Warp Infusions.
So demon poped out and met my puppets.
I don't understand fully mechanic. Sometimes I was able to damage demon with my heroes and sometimes I was possessd right away after damaging it. Maybe he got some range of this possesion ? I have save I will try it.