I believe you made the right decision by going around. If you have planned on using flap, and the flap fails; the approach is no longer stable (an unplanned/anticipated event has occurred) so a missed approach would be a good idea. Depends how technical you wish to get, but what would happen if you continued the approach and in the flare the flaps deployed? Being electrical almost anything is possible. Not just electrical but pretty much any system on the aircraft.
As others have said, it’s best to keep the plane flying. Go to the dead side, enter the hold... doesn’t matter. Just don’t rush to get it on the ground unless it’s a failure that requires an immediate return.