The first thing I did was buy a new battery to no avail. With the ignition switched on the engine checks go into a constant loop, the and the fan comes straight on which is apparently a sign of a defective ECU.
That is not true!
I once saw a stilo that was doing a similar thing: turn key on, get a lot of errors, cooling fan would come on.... in addition the car would sometimes not start ... once started it would run OK-ish.
We could also not connect to the ECU for diagnostics.
I tracked that down to a short inside the starter solenoid( on the stater motor).
fixed the short; then the car stopped throwing errors, fan was OK .. and we could connect to ECU for diagnostics.
I'm not saying you have the same fault.. but could be something similar.
Similar things can happen if one of the ECU's grounds starts to corrode..
-First thing is to get the ECU pinout;
-identify the ecu inputs for power and ground; then check they are ok(with a load..maybe a voltage drop test)
-identify sensor wires; identify the 5 volt rail/rails check it has 5v;
......
There are a lot of things to check before going out and buying a ECU.