tbh, I have never tried to swap the ECUs from another make.
I would guess, that if the eingine was the same, then it should (In theory), but they may use different control protocols, so it may not.
I would work on the basis of looking at an electrical fault rather than a faulty ECU.
I had a similar issue with my 2.0l, turned out it had a very minor misfire, that was cured by imply cleaning the plugs.
I would look at the most obvious, the IACV (Idle Air Control Valve). Take this off, and give it a thorough clean. Check the spark leads, Plug condition, check for vacuum leaks, etc etc.
If after all this, then you can get the ECU tested with ecutesting.com
They can do this from £35. Fast turnaround, have recommended these guys for some years now, and they have always had a good review.
(I am not now, nor have I ever been associated with the above company, its just a compnay that I have had experience with, and would recommend.)