This may sound very dumb however Being around Jeep for years and working for Chrylser -Jeep since 1986 I've noticed a few things over that time. One of them being with the 4.0l engine.
Are you putting in the 87octane Jeep suggests or are you putting in a higher octane? For some reason the 4.0L engine seems to run better as it get older with the occasional tank of premium but some folks tend to keep putting in the "good stuff" and the engine will start doing the things you're describing. Hope this helps, if you are putting in the higher octane gas it's just a waste of money, go back to the 87 octane and after a couple of tanks it should be fine.