You can cheese the pits fight by sneaking around the rig to a nearby cave, finding the tent opposing a lady magister (she won't attack you), put a crate at the entrance and teleport the npc-dumdum into the tent. Then just take the fight around that area, letting slimes come to you. Leave magisters alone to deal with the slimes as they come to you, they'll die but the time they buy you by tanking / damaging the slimes will make things much easier.
That usually stops him from fumbling about in necrofire for at least a few turns, which you can use to block him behind the barricades with your party.
With that said though, I think necrofire needs to be nerfed as it's really obnoxious; The AI is a bigger problem but I do think it is much easier to just make necrofire removed by blessing (maybe turned to steam), as opposed to completely re-doing the AI.
I had a derpy moment when ... (chapter 4 spoiler!)
There's a moment when you save a dwarf from deathfog-filled tunnels in Arx; I won the fight, I talked to her, I won persuasion. The quest was done, so she decided to leave her prison, and ... ran right into deathfog and died. Woops!
The AI definitely needs some self-preservation tweaking, not just with surfaces but with how an archer on 10% health will blink into the middle of my party to stab (but not kill) a low HP mage, when realistically he'd KNOW he'll not kill her, and that he'll die trying.