Say the ech to rip wiring is OK since the bike will run. So that says a wire can't reconnet itself so as to restart. Heart beat of a computer bike is the crank sensor. Warms up, stalls, cools, restarts sound like a crank sensor problem.
1. Diagnose: Ohmmeter in pocket, bike stops, instantly pull the crank sensor apart and ohm the C/S. In the morning, ohm it cold. Are the readings the same?
2. Throw parts at it: Hard to find a C/S out of spec, but when changed, running is solved.
3. What Jwooky said: Fastest way to vacuum lock is top the tank of to the brim. Should stall closer to home than when it warms up to running temp.