I don't think the posters are saying the HOA rules trump the Civil Code, the issue is that the code was not followed.
Civil Code §4745. Electric Vehicle Charging Stations.
(f) If the electric vehicle charging station is to be placed in a common area or an exclusive use common area, as designated in the common interest development’s declaration, the following provisions apply:
(1) The owner first shall obtain approval from the association to install the electric vehicle charging station and the association shall approve the installation if the owner agrees in writing to do all of the following...
As the OP did not obtain proper approval to install the charging station, everything else is moot. The OP will lose in court.
It is the OP's best interest to resolve the issue amicably with the HOA and use the incident to draft a procedure for the next owner that wants to install a charging station.