Have you tried to do computer diagnostics? Why guess if the problem may be on the surface? Use a
car maintenance app, or take the car to a mechanic to diagnose and localize the problem. This will make it easier to find solutions. Replacing the ECM may be a cheap solution, but if the problem is not there, it will turn into a waste + solution to the problem