all lights go out 5 minutes down the road?
when the truck is running and driving lights were on and working. 5 minutes or so later, all lights/electronics shut off in the truck yet continued to run the engine. letting go of the gas pedal turned on everything temporarily, then shut back off when pushing on the gas one time. after that the lights stayed off, and the engine continued running and driving. wiring? maybe? its a 1989 gmc sierra 2500.
Is this truck carb or fuel injection? I had a situation with a carb car where the sense wire on the alternator was not plugged in and the car was running on straight battery. As I drove it slowly drained the battery and the lights dimmed, eventually the radio died but it ran like a top. This took about 20-30 minutes More than likely you have a bad connection to the body harness. Typically the engine and body harness are separated. Pushing the gas is probably jerking the vehicle such that it can make the connection again. Hit a pot hole it goes out. Try to find a rough road and drive down it a few times. Do the electronics come and go as you hit the bumps? Further more, if they all go out, I would focus on the ground circuit first. Typically everything is run to a common ground. You may find it has rusted off or been compromised.