I may be way out in left field with this since I know more about HD motorcycles then I do with cars but...
Sound to me that some electrical component is getting hot. One HD Sportsters if the coil is getting bad and gets hot the bike will turn off and if you wait a while or pour water on it...