Yes, I just recently had the exact same symptoms in my jeep!
Culprit of it is in TWO areas which I had diagnosed and completely did the fix and eliminated all this sputtering and engine power loss. I too was doing the exact same thing you were doing (shutting if off then restarting it but it kept doing it so I took it in for service).
1) Replace your rotor and cap
2) Have all of your spark plug wires checked for a short, or just replace them.
3) Replace BOTH of the O2 sensors because in my case one was faulty but I just went ahead and did the pair to be on the safe side.
Lastly, use 87 octane gas. For some reason, my XJ seems to run better with no issues using the lower octane. Oh and dont use aftermarket parts, use the plain jane Jeep OEM stuff. My Jeep has been running perfect ever since I did the above!