Harmonic superpotentials and symmetries in gauge theories with eight supercharges