I work at a dealer and we have people complaining about this all the time. I have one customer who happens to be an indy race car engine mechanic who was quite upset at me not being able to fix his problem. He has an 01 XJ 4.0l too. there is 2 published TSBs for this problem. One being the heat wrap for the #3 injector, and the other being a PCM software update that makes the cooling fans to turn on at a lower temp. This suppsedly makes the underhood temps lower. Both repairs were made to his XJ with no real help for the rough running condtion. This guy I'm referring to travels between CA and AZ quite often and has the problem more in the hotter AZ areas. He swapped in a 180* thermostat and he seems to be pretty happy with the results. My 96 XJ has a similar problem when out driving on the trail. If I turn off the engine afor about 15 mins, it runs rough and sets multiple misfire codes. It will clear up after about 20 seconds, but it is quite annoying. I plan on installing a 180* thermostat and trying it for myself. Some people around this board will caution you against putting a lower temp thermostat because of emissions. The engine controller goes into closed loop when the engine temp hits 170*, so a 180* thermostat won't affect the emissions adversly. Anything below 170* will be a problem, so be careful how low you go. Give it a try if you like, but rest assured, you aren't the only one struggling with this problem.
Bryan