This fight is tough. It took me a while, but I managed to kill him and keep all three alive. Here is what I did:

1. Use someone with sneak, split from main group to arrange the crates and pop the oil so NPCs get herded into oil. That way they crawl, not run, to their doom.
2. Position everyone but the character the NPCs are following as close as you can with out starting combat prior to fight. Use sneak again if a character is good enough.
3. I used teleport to drop one mage back by the NPCs near the start. That meant 2/3 of then stayed way back there and killed him. But this is optional, just more buffer.
4. Get two characters by the switches. That is why I positioned early. Use the character with the most AP in the spot with 2 switches to the right. Get another on the left. Keep them there until mages are dead.
5. If robot is charged, use all three switches to drain charge before his turn.
6. If you fail to use the switches in time, reserve the controller weapon deactivate as an Oh Crap to buy you another turn to hit switches.
7. Your remaining two characters keep everyone alive, kill mages, and CC boss in that order of priority. Keeping the boss CCed is not as critical if you can hit the switches. One mage always charges him, or heals each turn once he is under half health. If you miss a CC on the robot it one shots most characters and NPCs unless weakened. But you don't miss switches, and they work every time unlike the controller.
8. Once the mages are down, keep the robot CCed as a higher priority, as his regular attacks are still hefty. That increases chances NPCs live on this stage.
9. It was helpful to keep weakened on the robot through the fight.

The controller kind of works for me, but it won't respond every turn. It does seem to work if you haven't used it on the last 2-3 turns. The robot happily blasted me to smithereens even in party mode.