Let's put it this way... if the battery can start the bike, ohm's law has all 4 variables up to the task. In other words, it can save the current produced to recharge the battery; it has the 'push' to turn over the starter. So we rule out the AC and DC, i.e., the stator/VR/battery and that loop.
Next loop is the electrical integrity loop. That's more or less the tightness at the battery posts, the wires at key switch to coil wires, and now this group in the E loop is cleared away for any variables.
Last is the black box. So I know I will have integrity from battery to key to coil, and now I want to wire up a bulb off the coil. I simply want to see the bulb go out on the (+) side of the wire I used for the bulb. This way, I can determine if yes it stayed on, then I aim for the cam/crank sensor. No, it cut out, then I aim for the black box. Now I narrow down to either or this loop. To find out; does the bike start back up? Yes. Then it's the sensor. Did the bulb go out and come back on? Then it's the black box. Because the integrity is sound, it can't be a broken wire [in the path] if it starts back up again. Heat is the break and when it cools, the path comes back, and I'd think this would point to the jobber in the loop, not wire integrity.
And not to rule out that you may have answered your own question, I'd check the battery in the static, when running, when I hit the start button. I want to see 14v or more at idle. Static, I want to see 12.6v or more, because anything lower than 12.6 says charge me back up. 12.8v is ideal static sitting around for a few days after fully charged. A battery will lose 1% charge a day, so say a month sitting is 30% down are the days. And then the chemical reaction sets in. The white crust on the plates. The acid and water separate is all. By cooking the water, you mix it back into each other... thus the 'push' and Volts says battery is good.