+ 1 for the wiring. Had exactly the same symptoms with a Cessna twin a couple of weeks ago. The prop-blast was occasionally blowing the field wire against the alternator and had eventually chafed. It was clear when the engine was shut down but the arcing was (just) visible on the case.
Have had faulty double Master/Alternator rocker switch causing the same symptoms as well. Loose terminals can be to blame too. Take your time and check all physical connections.