Infiniti J30 cut off problems on 1993 Infiniti J30

I own a 93 Infiniti J30..Ive recently had problems with eratic idling, severe hesitation, and stalling..the stalling would happen in two different way would be right after starting or when pressing the accelorator, the engine would die down and stall..but I would still have electrical/battery power and with flooring the accelerator I could restart the car...but it would also stall in anohter way..while driving, then slowing down ( not sure if it happened when I pressed the breaks or not ) the car would suddenly and completely die.. no engine die down, it would just cut off with absolutely no electrical/battery power and no interior lights or ignition key reaction. After trying different things, I found that there is a red plastic connector attached to the positive battery cable..when I slide it off it's L shape pin, which is connected to the positive battery cable terminal, then reconnect it, the power comes back on in the car and it will start right back up...I dont know if the red connector is supposed to be able to come off its pin or if it is broken, but everytime the car stalls like this..suddenly and with no electrical power..I can disconnect and reconnect this connector and the power will come back on...but when I wiggled and disconnected it with the car running, it did not stall out the car..
So I pulled coeds from the ECU and got a faulty temperature sensor reading... I replaced it, and cleaned the throttle bodies and MAF ( using proper cleaners for both ) and now the idle/hesitaion/die-down stalling problems seems to be fixed..but the car is still cutting off with no electrical power after driving then slowing down..such as to turn a my questions are..what could be causing this, could it have anything to do with pressing the brakes, what is the red connector attached to the positive battery cable terminal and where does it lead?Any help would be greatly appreciated

2 answers
Hi, I have the same problem. Did you figure out what it was?
It's hard to give a good advice without seeing it, hopefully a Infiniti/Nissan tech will chime in and be able to tell you more, but it certainly sounds like a bad connection, which could be easily repaired by most shop for a fair price. Did you show this to a technician yet?