Hard to judge where to start here, but I always start with an identifiable symptom.
I would probably rather figure out why it didn't run right first. one must identify what is different when the event occurs.
From the A/C side of it. Check the fault codes at pin #7 using the impulse technique. Do not turn the car off before doing this as the codes only will be present during the event.
My feeling is that you have some sort of power distribution problem. check your fuses for voltage drop during the event, particularly fuse 5.
Bosch Master, ASE Master, L1
33 years MB technician