that's where the troubleshooting part comes in, they need to look at ALL of the external possibilities, starting at the battery, grounds, maf, 02 sensors, possible leaks, backpressure test, etc, etc,
if it was a long block they re-used the intake, so smoke test.
all it takes is something being a little too much out of whack and the code is set
it sounds like it happened or happens under a load so that's going to make it a little harder, someone probably needs to do a drive record and look at all the data.
my guess would be something in the intake or exhaust if not a leak on the intake. but the electrical system needs to be ruled out first which is generally easy.
the good news is it is not likely to be the engine