Remember that the onload Event is called also when the subgris is refreshed, so for example, also when you just load the parent form.
My idea is that you could use an hidden variable with the number of subgrid record. When the onload event fire, you can retrieve the records and see if the total is one more than the value in the hidden variable. If so, you can update that number and trigger the flow