Your vehicle has many miles on it, and most likely it has not been properly maintained.
if you have been driving this vehicle with codes for the O2 sensors it is very possible that car is having a hard time achieving closed loop status.
For your vehicle to run properly it needs to be diagnosed properly from the correct starting point.
First and foremost, Compression you need to know for sure that each cylinder is getting sufficient compression. if one or all of the cylinders are low it just will not run correctly.
Any part you hang on a engine that lacks proper compression is like fueling up a car that was totaled and cannot be driven. ( it just doesn't make sense to do )
If I had to repair your car, a compression test is where I would start.
However since I do not have a brain that has total recall I would look up how to perform a compression test on the this car in a factory service manual.
The manual shows how to do it safely and accurately so you end up with data you need without risking damaging yourself or your vehicle.
the manual will also give you the range of what the compression should be.
if your vehicle has a worn timing chain and gears the compression on each cylinder will be low. this is a reasonably easy fix for a major problem.
However if you find it has low compression because of a worn timing chain set , this means you have to retest the engine once the new chain set has been replaced.
We can all sit around a camp fire guessing and tossing out ideas of what part you could toss on it or what test to run on it until the cows come home. yet the testing in my opinion has to start at the beginning at the most important part you have.
The engine, with the mileage you have on this engine it is not unusual for chunks of carbon to flake off , and get logged in the exhaust valve as these bits try and exit the engine.
This can and will cause intermittent rough idle and stalling.
I am not saying your engine is bad or even needs any of its major parts repaired.
However I am encouraging you to do what any well trained technician would do which is a compression test.
If you want me or anyone else to help you properly diagnose your vehicle, This is where I would recommend you start.
To do this test, you will need a Factory service manual or online subscription to a factory manual like alldata diy or Mitchell 1 diy
You will need a good compression tester, which can be picked up at Napa or Autozone and other parts stores as part of their tool loaner program, you shell out you cash for a used tool set, and return them for a full refund once your done using them. or keep it if you decide you cannot live without this new toy I mean tool.
Like many other people here I could try and read between the lines and symptoms and start with diagnostics somewhere else. yet with the mileage you have on the engine.
I feel this is the best place for you to start to avoid wasting time and money.
In a shop environment the this test wouldn't take more than a hour of your time.
Starting diagnostics from the wrong place will have you spending time and money on a engine that yes may need to be rebuilt or replaced. rendering any and all the work you did worthless.
If you want my help, you will perform the compression test, taking pictures of the compression gauge for each cylinder after you crank it over. labeling each picture for the cylinder you tested. or at least write down your test readings for each cylinder.
I also recommend when you pull the spark plugs you take pictures of the spark plugs labeling each cylinder they came from.
Reading the spark plugs will give us a good idea of what to look for in the next step of diagnostics.
After you do all of this I will recommend where to go next.
If you do not I can not help you. however many other people here may be capable of knowing for sure your engine is fine and give you the magic tip that may save you from proper diagnostics.
Good luck either way you decide to handle this repair.