It's the PCM & TCM . Just had the exact same issue. Problem solved with junk yard parts $90. Dealer wanted $1100 to fix with new parts.
Powertrain Control Module (PCM)
Transmission Control Module (TCM)
2002 Ford E-350, 5.4L V8; 88k miles
...first. I think it is the throtle sensor just off the left side of the injector pump. When it will not start I put a little water on this part and it then starts right up. Does this sound right to you?