Sounds like there's corrosion or debris build up in the solenoid since it is intermittent. Seems like you've eliminated it being a heat related issue or a connection issue; the only thing you didn't mention is the actual ground used by the solenoid itself, which might be dodgy enough to cause this. I need to look myself and see if the solenoid uses a wire or a "hard" ground to the frame.