I seriously doubt it’s the ECM as the vehicle is running. Just don’t shoot a parts cannon at it and hope for the best as there are many things and thousands of dollars to spend shotgunning drivability issues. Pay someone with the proper diagnostic skills and equipment to do real time scanning and you will be dollars ahead.
Autozone and most other Parts stores will do it for free.
Had a '92 Jeep Cherokee XJ for a while. It would start and run intermittently. That is, it would run fine as long as it started, it just didn't always want to start. I went the computer and started reading up on causes. It boiled down to one of two things; the ECM or the Crank Position Sensor.
Well the CPS was all of $35 plus tax, and the ECM was over $100. I bought the cheaper part, and went home to replace it. I pulled the old one off, and it looked brand new (I had just bought the Jeep from my mother-in-law, and she'd had a bunch of sensors replaced trying to fix the problem). So, I put the old one back on, and took the new one back, having not installed it.
Then I ordered the ECM. Took all of five minutes to replace, and it ran great, and started every time. No issues.