That definitely sounds like a loose connection, not an ECU problem. Usually it's a bad clamp on the battery terminal. Often it's the ground clamp in particular.
The easiest diagnosis is to rotate the cables on the terminal several times to rub off oxide build up, then leave them in an orientation so that the natural tension of the cable forces the clamp into good contact.
A "dead" (low voltage) battery will still cause some indicators/lights to come on when you crank, while a bad connection usually acts like zero volts.