ECU doesn't reset. Timing can't be adjusted with the distributor.
Time to do a few things. First off, make sure your distributor is indexed correctly. see #13.
Make sure your intake manifold bolts aren't loose. How old are the plugs, wires, cap and rotor?
Clean your throttle body.
Courtesy of TJWalker:
The Idle Air Control (IAC) is mounted on the back of the throttle body. (front for 87-90) The valve controls the idle speed of the engine by controlling the amount of air flowing through the air control passage. It consists of a stepper motor that moves a pintle shaped plunger in and out of the air control passage. When the valve plunger is moved in, the air control passage flows more air which raises the idle speed. When the valve plunger is moved out, the air control passage flows less air which lowers the idle speed. Over time and miles, the IAC can get carboned up which can have an adverse affect on idle quality. Cleaning the IAC may restore proper function and is an easy procedure to perform and good preventive maintenance so it is never a bad idea.
CLEANING THE JEEP 4.0 IDLE AIR CONTROL
Remove the air filter cover, associated hoses and the rubber boot that goes from the air filter cover to the throttle body. Remove the IAC with a torx driver (2 bolts; one can be kind of hard to get to)
“Gently” wiggle out the IAC from the throttle body. Gasket on the IAC can be re-used if it is not damaged
Clean the IAC with a spray can of throttle body cleaner; inexpensive and available at any place that sells auto parts. Throttle body cleaner is recommended rather than carburetor cleaner as it is less harsh, safe for throttle body coatings and is best for this task. Use cleaner, a rag and a toothbrush and or Q-Tips. Be gentle; don’t twist or pull on the pintle that protrudes from the IAC as it is fragile and you could damage it.
Thoroughly spray clean and flush where the IAC seats in the throttle body with the same spray cleaner
It is also a good idea to clean the entire throttle body itself, the butterfly valve inside of the throttle body and all associated linkage as long as you have things disassembled
Do 1,2,3, and 4, along with 13 in the folowing link. Cheap and easy.