Another shout for crank sensor -probably because it seems you have replaced everything else.
Have a look at the engine loom going to your TPS, its routed just above the exhaust manifold, wiring insulation gets crispy and drops off -this can cause all sorts of intermittent problems. just need to cut out the bad bits and solder in new cable.