Throttle body sensors
The Accelerator Pedal Position Sensor could be a cause , but check an clean throttle body or replace an check regular sensors first and check codes ,,my 2004 which I bought from my nephew , he had tried many things first an could not solve lighting bolt , it would run good for 30 miles an suddenly go to limp mode an lighting bolt , shut off an run good for awhile an again quit , was very intermittent ,and was throwing several codes related to throttle body and emission leak large an small an other related codes ,,he had replaced throttle body an other sensors but did not know of the Accelerator Pedal Position Sensor or APPS , once I bought it an fought it for a few weeks I realized that the Accelerator Pedal Position Sensor was located under battery box and you cannot see it very well , removed inner cover at fender behind tire to access and found it , and its at least $300 if you can find one , but once I replaced it it cleared 4 or 5 codes an ran like a champ , but no way to check an make sure its your issue ,, and why I say check all other things first but it did cure mine an runs great now past 2 years or more



