Re: 5.4 V8 has started to die at idle.
It may be an apples and oranges thing and may not even apply to a Ford engine, but my '78 Volkswagen van used to do the same thing periodically. The fix was to replace the engine temperature sensor, which in that engine was a $25.00 part and simple to swap out. With all the chips and sensors in today's engine, it just takes one misinterpretation of data to foul things up. Hopefully this steers you in a helpful direction.
Steve in L.A.
2010 Red EB50 V10, Quadvan 4WD (El Guapo Rojo)
1978 VW Westfalia Champagne Edition (Pepe - gone, but not forgotten)