The first two things that I would have done (seeing as the fault occurs with the engine running), is to test the condition of the battery & connections & to do an alternator ripple test. This is what's known as an initial check, and it should be carried out before
any electrical work commences on ECU circuits to rule both potential problems out. Modern computer controlled systems are highly sensitive to relatively minor faults in the battery and charging system, either a too high/low supply voltage or too much AC current in the DC supply.
O.K. you did "get lucky" so to speak and found the fault without having carried either test , potential faults found during these tests could have caused the issue(s) described. My sisters very own Zafira with a rev counter problem being a case in point (a bad alternator diode).
BTW, resistance testing components is pretty old school and rather hit and miss, I remember condemning a slightly out of range cam sensor on a Vauxhall as faulty when in fact it shared the same 5v reference circuit as the
crank sensor. This was not apparent from the diagram I had, there was an intermittent short to ground problem with the crank sensor causing the issue (signal drop out, car stalling). If I had known the circuits were linked I would have checked both, shared ECM sensor circuits are notorious on some Vauxhalls/GM and a lot of people aren't aware of this. I wasn't at the time.
Another thing is that I used to hate testing/condeming MAF sensors on a vehicle where I didn't have a new one to easily swap out, because you can have one show out of range but still function perfectly o.k., it's difficult to test one fully using a ordinary multimeter.
Dynamic (live circuit) testing where the fault can be seen clearly in real time (or logged/recorded) is by far the best method of condemning the wiring or sensor (not for obvious short circuits though, check them first with the battery disconnected!

). Wiring can be checked via voltage loss & drop methods which are easily performed with a normal multimeter.
Lab scopes are a fantastic piece of kit for condemning sensors (especially MAFs) although not many technicians seem to either know how to use one or to have access to one.