I think it’s done a lot. However, it’s not good for the wiring connections and especially the areas that take a good while to dry. We’ve all washed and shined our car engines and made them look new again. Probably not as bad for a 12v system and certainly not as dangerous as would be a 120v.
A few years ago, I purchased a new riding lawnmower. The mechanic who was explaining it to me told me that he recommended to never wash the engine and entire mower. He said to use compressed air and just blow it off. I think that’s good advice.
Perhaps washing without getting everything soaked is wise. That foam kind of disappears anyhow.