Sounds like you have a broken wire that makes & breaks contacts randomly ,
This is going to be a right royal PIA to find .
Easiest way is the remove the deck & belt get the mower up in the air and very stable .
The start pulling /pushing wires , particularly where they plug into the clutch and at every joint & plug .