I would start with trying to sort the O2 sensors first.
The O2 heaters are important for the O2 sensors to actually warm up fast enough to then get the O2 sensors to pass.
First thing I would do is check the fuses for the O2 Sensor heaters. You may also need to make sure you have power on the O2 Sensor heater wires.
Usually if the O2 sensor heater is open, the DME will through a code for this?
Also time exactly how long it is taking your engine to go into closed loop on a cold start.
Based upon the Fed Drive Cycle, it looks like close loop should happen around 2 to 5 minutes? If you are not going into closed look before 5 minutes, this is likely part of your problem, O2 sensor heaters not working and/or O2 sensors too lazy??
How old are the primary O2 sensors?
If you need to replace them, check Amazon for Bosch sensors, usually around $50 each.