I'm not trying to smart off at you, but with those miles and unknown maintenance, I'd start with The Usual Suspects. I'd check the vac hoses as those are easy and cheap.
If that didn't change much, I'd go for the plugs, wires, etc. I don't know if by '97 there are plug wires, but you get my drift. Age and miles can be hell on ignition parts.
It might...might...be an ignition module but that's not at the top of my list. Others to look at are the MAF sensor (may be able to be cleaned with MAF cleaner), the Idle Air Control (if so equipped), etc.
If those don't work, go up the food chain. Is the timing adjustable? I don't think it is but there is the cam position sensor that can be off and would effectively alter the timing. I'll defer to those who own later models than I do (a '91) on how to get to that sensor and what's involved.
I know this answer isn't exactly consoling, and for that I apologize. But the miles leave all kinds of possibilities for problems. If you get totally bored
you might try a cylinder pressure test to make sure there isn't something seriously wrong. Normally the 4.0's are very long lived but that can rule out a major cylinder loss.
Hope this helps. Keep us posted.
Brian