2003 MX5 mk2 1.6l wont start with P1345 and P1562 codes

I bought a 2003 1.6l MX5 yesterday, car seemed in pretty good condition. Took it for a test drive, it ran perfectly throughout the rev range, code reader was all clear and the carpets were all dry - Seemed all good.

Today the car won’t start, or if it does start it runs for a second very roughly before dying, and i’m getting different codes each time I try to start the car. P1562 has been there consistantly, and i’m getting P1345, P1103 and P1122 intermittently. From what I can see online this looks to be a fault with wiring in my ECU - Lifting the carpet the insulation was soaked through, however the carpet on top was dry. After many hours trying to get the ECU out I’ve found a lot of corrosion on the connectors & pins.

I then had a wire break when removing the plugs from the ECU which corresponds to pin 4AG on the connector according to this diagram. This made no difference to the running condition of the car.

For many others, reconnecting pin 4AG to the wire seems to have resolved P1562, i’m still seeing this code reappear after clearing codes & attempting to start the car. Any ideas of what I should check or replace next would be appreciated, as i’m thinking I might have to solder the entire harness which I don’t much fancy.

It seems likely that a number of wires have been caught in that vulnerable area where the fine copper wire is exposed between the connector and plastic wire coating. You will need to replace all damaged wires as the voltage carrying capacity is compromised long before a snap.
The other issue is PCB damage and more likely the ‘L’ shaped connector wires that go from the back of the connector pins to the board itself. Water holds in the plastic connector and feeds the corrosion; these often dissolve away. You will quite probably need to replace the ecu and associated parts. Take the ECU apart as all water damage will show very clearly. I think you will quickly see where the problems are.
The error codes are likely symptoms of reduced signal voltages due to compromised wiring rather than component issues.

Opened up the ECU, there was some surface corrosion towards the bottom where the plugs connect to, i’ve cleaned it up the best I can & ordered a new engine → ECU loom, so hopefully that fixes my problem. As for the L shaped pins, apart from 1 they all seem to be in pretty solid condition, so hopefully the ECU doesn’t need replacing. Am I correct in thinking that replacing the ECU also means replacing the immobiliser & keys?

I did think the codes were more likely to do with the wiring - It would have been unusual for multiple things to fail at once was my thinking. Thanks for confirming that though.