To rule out fuel, next time it does it immediately shut the fuel off while it's cutting out.
Now, open the fuel bowl drain screw and you should have half a shot glass or more of fuel.
That will help you narrow it down.
I have done the same thing, thinking electrical or fuel but this tells you. If fuel is not flowing, junk the stock fuel filters above the petcock and run a clear sintered bronze inline fuel filter in it's place.....
All our government does is distract us while they steal from us, misspend our tax $ and ruin our country