Just make sure you use WD40 Specialist Contact cleaner, NOT regular WD40 lubricant which will not clean contacts and leaves a residue. I've used Servisol switch and contact cleaner/lubricant for years.
I should have asked earlier, when the bike cuts out, does the starter still work? If so, then the clutch. side stand and cut-out switches are all OK and it is just the ignition circuit that is at fault.