I'll make a short list for you; Things that can screw up an IAC are, solids stuck behind the piston. I periodically let a few drops of synthetic oil run behind the piston. Gunk (sticky stuff on the piston or around the seat) Penetrating oil and a small brush will usually take care of that, maybe scrape a little with a piece of plastic.
Low voltage, battery or charging issues often show up first as IAC quirks. I don't know why, but it has happened enough times I know it is so.
You always have to be suspicious of grounds and connectors. The low voltage issues may be because of grounds or poor connections. Maybe just enough of a ground or connection issues to affect the IAC and not other functions.
Just because you swapped out the TPS, doesn't ,mean the issue isn't in the wiring or connector or even the grounds. People get in the habit of swapping out components and forget about the wiring.
I've had good luck scrubbing out the connector pins with a good quality contact cleaner and a tiny scrub brush normally used for brushing between your teeth. Grounds get cleaned with a wire brush or even sand paper and the connection gets tested with an ohm meter. The ground rings are sometimes soldered on, sometimes not, the resistance can be in the crimp at the ground ring.
I've never tried it on an OBD XJ, but on the Renix you can warm up the motor until you get a normal idle and disconnect the IAC. The only time it should cause an issue is at cold start up when the engine normally idles high and it is likely the CEL will come on. There may not even be an IAC CEL code, I'd have to look it up to be sure.
When it idles up may be a tip off. Cold start, Hot start, right after you released the gas pedal, RPM's that kind of spike or rise with a constant pedal? etc.
Is it possible it is a mechanical issue? Broken throttle plate return spring? Which is hard to see. Loose throttle plate? You may want to poke the throttle plate with your finger and see how hard or easy it moves. I seem to recall the throttle plate is hard to move with your finger tip, even with the throttle cable removed. Check out your carpet, padding or wiring or whatever right near the pedal.
Make sure you aren't accidentally pushing the gas pedal when you brake. Sounds silly, but I've done it. I'm 6'3" and wear a size 13 hiking boot. By the time i spread my legs enough to clear the steering wheel, I tend to brake with the ball of my right foot on the extreme right of the brake pedal (I brake and gas with the same right foot and not two footed). It is easy to brake an inch to the right and spread my right knee a little to far right and contact the brake pedal and gas pedal at the same time when I brake. I mostly cured this by buying a 71 Chev truck (I think) brake pedal rubber which is an inch wider that the XJ, but fits just fine and makes it much harder for me to slip and push the brake and gas pedal at the same time. I have actually jammed my boot sideways under the brake pedal and on the gas pedal, while turning around to look over my right shoulder when backing up. This may be irrelevant, but I figure if it has happened to me more than a few times, it has likely happened to somebody else also sometime.