Obtain the service manual set for your vehicle. Look in the wiring-diagram section, find out how the ECM is powered.
Verify that wiring for loose connections, weak fuse-blade terminals, broken/intermittent wires, etc.
I would want to connect a scan tool, and see what other info I could get that might be useful. Verify EVERY sensor and computer output.
Wouldn't hurt to check the battery connections, too. Assure that the battery isn't losing voltage while parked.