First off, the oxygen sensor in no way costs anywhere near $400.
I’ve had three vehicles develop that “check engine” syndrome and it always turned out to be the O2 sensor for the catalytic converter. Two new Hondas and a new F150.
I spent days on the internet and talking to a couple of mechanical engineers about it. It is ethanol in the gas. It is very effective in disabling wideband 02 sensors. Ethanol eats hoses, gaskets, sensors and a host of other problems. I’ve had to be come a carburetor rebuild expert on all my 2 cycle engines because of it.
I finally broke down and bought a CAN/OBD II reader and when the light pops, I read the 02 sensor code and then reset it. It has saved me its cost several times over. BTW, the F150 runs just fine even at 105K miles now.
That price is parts plus labor.