I have a 1998 jeep grand cherokee with a 4.0L it started idle surging from400rpm to 1000rpm and lost alot of power I replaced the disturabator, cap, rotor, button, and plugs and wires no change so I replaced the injectors and complete fuel pump no change so I replaced the crank shaft postion sensor it ran great for about 10 min. Then went to running bad again.
Check for applicable trouble codes. Clean the idle air system. Several sensors share ref voltage and ground circuits. A problem with one sensor could cause issues with other sensors. At the moment, I'm not sure it is a sensor issue?