Do you have a keypad inside the little flap by drivers' right knee which gives access to the interior fuse box? If so it's likely an OEM (Thatcham?) fitting. If so do you know the 4 or 5 digit PIN and if so does inputting the code make any difference?
It mat be cheaper/easier/quicker to swop in another engine if you can find one. Costing when the actual damage is yet unknown is unlikely to be successful.
Have you considered eBay?
https://www.ebay.co.uk/p/19056834021
May fit? I don't have any knowledge of this item (my OB has old-style steering) but if you can find a compatible unit, may help?
As for coding, no clue. Out of my depth on that one.
Good luck with doing hg yourself. **** luck it's happened that the 3.0 is suffering hg in the first place as those motors rarely suffer such failure.
I understand doing a 3.0 hg replacement is serious work - have you've previously done this sort of work so realise exactly what you are getting yourself into?
I wonder if the car has passed an MOT as failures can come if the MIL is on at time of test. Assume you've checked transmission fluid level as needed? Did the lambda sensors get changed before or after the faults appeared?