On the parallel twin I don't know where the HES is. It will be either ón' the crankshaft or the cam shaft. I know where it is for teh airheads, oilheads and old K models.
Once you find it, repeat the test again, when the bike stops – cool the HES (throw some water over it – avoid getting any electrical connectors wet) and see if it will then start. Buy cooling the HES alone you can confirm that as your problem.
Replacement from BMW would be around the $300 mark, alternatively you may source one from an electronics supplier for around $30 – you then have the job of removing the old ones rivets and cutting its wires, then you rivet the new one in place and solder the wires and insulate the new joint.