When the engine heats up metal contacts may "move apart a little" and be a very hard problem to find.
I have two suggestions.
Coil pack and TPS. One of these two item may do what i described above and be very hard to get them to do there problem long enough to pin point the problem.
Good luck.
Eric