Just wanted to post here that the dead pedal issue was caused by the engine getting to 220 degrees and the fan clutch not kicking in at 210 when it is supposed to. Apparently in the 04 model if the motor gets up to 220-230 degrees and the fan clutch is not engaging, the computer will kill the pedal.
Also, do not use a duralast APPS sensor in an early 2004. They market it as functional, it looks identical, it works for some time but it causes major problems. For me at least. The calibration for that sensor is to rotate is to where at idle it is sending a 0.5-0.6v signal and this is done by backprobing pin 3 and negative battery terminal. The instructions also described if you don't have a multimeter use a scan tool to calibrate to 12% at idle. I did this, and i warrantied that APPS 3 times.
I talked to a friend who called duralast. They said they do not make a sensor for that model truck....weird. So he went to NAPA and bought a different one, this one is the housing with the sensor. They say don't mess with it just throw it on. Been about 100 miles and 20 restart, pedal still works and fan clutch also turns on at 210 degrees. We saw with his scan tool at idle the old APPS was at 12% but the new APPS is at 0% which makes more sense to me. Also the old APPS at idle computer was getting 1v and with the news APPS at idle computer is seeing about 0.5v.
Seems like the high voltage was screwing everything up and causes fan clutch codes, which would in tern allow the engine to overheat and everything would freak out after that.