I didn't know that WD40 regular has solvent in it, or that solvent would be bad for the alt.
Any oil (fish oil included, which is the lubricant in WD-40) possesses solvent properties - depending on the material to which it's being applied.
I try to keep non-evaporative, general purpose 'cleaners' or 'lubricants' away from certain electrical parts for a few reasons. Besides potential breakdown of the surfaces which they coat, let's take a look at what's now sitting in the brush holders of that alternator:
An oily film.
What does an oily film attract and retain?
Dust. Including graphite, from the worn brushes.
I have a feeling you'll be revisiting this job down the road.
Don't get me wrong - WD-40 and similar formulations definitely have their places and purposes. Inside a bearing, an alternator or other apparatus which must remain serviceable and free from contamination yet retain any OEM-supplied lubricating compounds isn't that place.