Out of the several hundred OBD II codes that may be set, not one of them is "O2 sensor bad". Since you just replaced it, I would not assume it bad again.
Sure, your O2 sensor may be bad, but my suggestion is you fix your wiring problem, or your vacuum leak, or leaky fuel injector, or incorrect fuel pressure.
PS> The lean/rich codes are two trip codes. So, if you reset the code and make a trip without of CEL it doesn't mean you fixed it yet. You need to take a few individual trips without a CEL to confirm.
Good luck with it. That code is sometimes hard to properly diagnose and fix.
97 TJ Sport OPJ project (other peoples junk) I can't remember the last time I bought a new part.