The problem of an engine that runs ok when cold but has problems when the engine has warmed up is nearly always caused by a bad upstream O2 sensor. The computer doesn't look at the data from the O2 sensors when the engine is cold, it relies on a canned program of how to set the air-fuel mixture. But once the engine starts to get warmed up it switches from that canned program to the upstream O2 sensor(s) for how to set the air-fuel mixture. A bad upstream O2 sensor can cause a warmed up engine to fall on its face.
Your '98 fortunately has just one upstream sensor which is mounted on the exhaust just below the header system. If you decide to replace it, make sure to ONLY install an NTK branded sensor. Other brands of O2 sensors, especially Bosch, can cause problems in a Jeep. There's no need to also replace the downstream O2 sensor mounted on the catalytic converter, it has nothing to do with your problem... it just monitors the catalytic converter for proper operation.