Tough without a code reader. Future reference, most codes go away when the actual problem is fixed. Clearing codes might make you feel better, but the codes typically come back and the cleared codes make it tough for a mechanic (when you finally get it into town). There are some in-expensive code readers that are worth it - if you are handy enough to change a transfer case a code reader should be an easy choice.
Since your check engine light hasn't come on again. It might be more of a missfire. Cars made after 1997 are supposed to check for missfire but if you aren't running at high enough loads (full throttle acceleration) it might take a bit to set that light. Make sure all the coils are properly hooked up. You could get an ohm meter and measure out the coils. Chalk it up to bad luck that a coil failed during your other repair.
OR If you have most of your troubles at idle - and it runs fine at higher rpm.... vacuum leak There are lots of vacuum lines and I'd visually inspect them all. I would listen for the hissing noise etc. Then I would one by one plug the lines at the manifold and see if my idle improves. I believe WJs with the 4.0 had vacuum disconnect on the front axles, I would peak at that one first. The big one is always power brakes.
BTW, if you have lots of miles on the motor (pushing 200,000), consider throwing a new timing chain in it. Made a world of difference on my 4.2