p1: pull it out when he casts his explosion, shouldn't be a problem. In the rare case it gets hit by the fire dot, there's nothing you can really do but that only happens if it stands near the player who gets hit, doesn't really happen often.
p2: pull it out during laser barrage, rest of the phase it should be fine because it automatically dodges the guns by running behind the mob. the nova+dot didn't seem to cause a problem with some stray AE heals and maybe a mend pet here and there
p3: No danger of it dieing there I think.
p4: Honestly I didn't bother too much about my pet on the first kill, there's enough other things going on to care about so I just make sure I cast CotW before it dies

. I try to pull it out during explosion and barrage, but usually I don't react quickly enough as I don't see the castbars of those parts. It can't attack the same part as me anyway so sending it back to attack one of the other parts is even more hassle.