okay, typical project where it needs fiddling. However loctitie wont work in this case. Even the highest grade of loctite (red) will stop working at 200deg F, and in fact, if a fastener is stuck and wont come loose, thats the best remedy is heat it up to over 200Deg F to break the bonds of the loctite. So for exhaust apps, loctite isnt a valid player.
It IS typical to see a part loosen after heat cycles, my suggestion is frequent tightening and perhaps consider Stainless steel safety wire. There are many websites detailing how to use safety wire and is standard procedure in aviation applications. You dont HAVE to have the nifty safety wire pliers to use it but it sure helps.
the loosening is common in exhaust apps, let me describe what i found REALLy works well for performance headers on hotrods. I cannot claim credit as i developed it after reading several tips in car magazines in the 1980s (Car craft)
so Header gaskets on cars fail all the time, So they use a fiber material and its almost like fibers and clay so the procedure is soak them in water remove or loosen the headers clean the surfaces, while still wet insert the gasket and install the bolts, and tighten up very snug, not too tight and be careful not to strip or snap off a bolt, if in doubt run a bottoming tap in any holes, after assy start the vehicle and warm it up, check for leaks and snug up bolts are required. shut down let cool, repeat several times. each time tightening the bolts. after repeated heat cycles the gaskets should have "Cured" in place and the moving around is done. snug down once more SECURELY, not excessively tight, but SECURE. then use .032" thou Stainless aviation grade safety wire and safety wire the bolts in a TIGHTENING pattern.
End of problems with header gaskets, so the same thing applies to your O2 sensor, Im not an expert at computers and sensors for this ECU and EFI stuff, but im confident that header leaks will damage a O2 sensor so be careful.