Last time I had a vehicle that did the exact same thing as yours, runs till it gets warm and then dies. Turns out it was the Hell Effect Sensor or whatever the hell its called inside the distributor. Try going to the junkyard and grabbing another one. Worked great for mine and you seem to have the same problem.
1984 Suzuki SJ410, 1.3L 5speed, soft top, spoa, shackles, bodylift, 6 offroad lights.
1988 Dakota, 318, 5 speed, 4.10's, rollbar, lowered 3".
1986 2dr XJ, 2.8, 5 speed, Bushbar,
1989 XJ, 4.0, AW4, NP231, D44, 3.73's, *Stolen*
1987 MJ Sportruck, 2.5, AX5, Rollbar, *Jeep Heaven*
1986 MJ, 2.5, T-5, bushbar, Longbox, *Jeep Heaven*