Next time it happens, open the gas cap and see if you get any venting noise like air suddenly rushing in. I can't speak to the electrical smell, but the rest of this really sounds like a fuel flow issue to me. On the 750 forums this is sometimes referred to as POOG (phantom out of gas).
I was reading for any threads about gas cap and pressure and saw this thread. I was test riding 15-20mph in my neighborhood in 2nd gear. On the way home, I tried throttling a bit more and I felt the power, but then it cut off and I noticed that the engine had died. It was difficult to restart and I was able to get it to idle weakly by throttling while starting. However, when i tried to throttle a bit, the idle weakened and died.
Once I parked the bike and turned off the bike and removed the key, I heard a high whine noise. I thought it was the fan but it wasn't. Then I noticed it came from the gas cap. When i opened the gas cap, it sounded like depressurizing. I could look in and see a clear tube with fuel in it and bubbles rising to the surface from the bottom of the fuel. The bike is difficult to start.
I checked the puke tube and it seems clear.
I took a video, don't know if it will help:
After reading this thread, I wonder if I have a loose battery connection (might have messed it up while putting the seat on. If it's normal for the gas cap to make that sound when the bike is turned off, then I would lean towards this, but I don't recall ever hearing that sound when turning off the bike.
It is a new (used) 500 tank for me. I am using the fuel cap from my previous tank (which I believe was a Vulcan 800 tank, looks identical but the petcock is further back for a V Twin config).
I'll go ahead and check part numbers to see if they are interchangeable. The meter was so I'm hoping it is.
UPDATE: When I closed the gas cap, it began making the sound within seconds even before I started the bike up. Once unlocked, it depressurized again.