I agree with Don, it could be fuel related.
Many years ago, I modified my Honda C70 step-thru into a trail bike, and rode it happily around the UK. Then I took it on a trip to the Alps, where it started having major ignition problems. Eventually, at the side of a mountain road, I discovered the problem was the condenser - it was mounted to the charging/ignition backplate, on the other side of which was hot engine oil. All the time the oil temperature was normal, it was fine, but climb a mountain road and it would fail.
Anyway, the point I wanted to make is that while bench tests are important, some things won't fail until hot.
To find the fault, I actually stripped out all the wiring on the bike and then reinstated it, wire by wire, so I could discount any poor connections. I would consider fitting a temporary ignition wiring system, and also recommend checking that you still have your 12v to the points when the failure occurs.
And here is the C70 just before I stripped the whole wiring system out:
Ah, to be young and stupid again...
trevor