routier:
the time / money spent , you should have got a reconditioned engine and you would have even got some form of warranty!
It sounds like it’s more likely a wiring fault external to the engine anyway so the same issue would likely have arisen with a recon engine.
Paul