2001 Mustang engine shuts down for no apparent reason, mystifying even the experts

Yes, I do mean solenoid. This problem is beyond my mechanical capabilities, but I don’t believe it’s a fuel problem. When the engine shuts down all electrical systems go out as if I just shut off the engine with the key. It’s maddening, it even occurs while driving a a fair rate of speed on a long strait away.