These are the most difficult type of issues to diagnose. Seems you first need to tie it back to fuel or electrical. My money would be on electrical, and something happenning associated with elevated heat. That could be a lot of things. I'll assume that there is no correlation to moisture (rain or cleaning/washing). Only thing I can think of is an old fuel injected bike I owned briefly. One of the wires to an injector had a very poor terminal crimp causing the injector to fire intermittently. When it ran it ran perfectly, and when it didn't it would do exactly as you state. It was a bit of a bear to diagnose and really wasn't until it became really bad that the dealer tech could figure it out.
if a crimped wire to a fuel injector turns out to be the problem, I will be really disappointed in H-D for giving me such a crappy experience with a top-of-the-line bike (this is my fifth H-D, first CVO, and the first bike I've ever owned of any make to ever do anything like this) when such a stupid problem (which, if that's what it is, could imho only be caused by laziness in the manufacturing process) was the cause of such an aggravating and chronic problem. The bike is currently not being ridden much due to the cold weather here in New England, but I had it out last Monday when it was about 60 out and a beautiful sunny day, and it ran great until I got it home, when it stalled (the same way, and kept stalling every time I restarted it so I had to feather the throttle to keep it running until I shut it off) just as I was pulling it into my garage.