Could this corrosion be caused by faulty ground wiring?
There are any number of things that could cause corrosion:
 - leaks or other water on the corroded surface
 - grounding or some other electrical field
 - ambient corrosive elements in the air (water, overspray from other projects)

I think you did the right thing by checking and fixing your grounds. That might not be the root cause, but it doesn't hurt to have everything properly grounded.

Does your water heater have a sacrificial anode? They can be somewhat tricky to inspect and replace but if its old and used up then corrosion might attack other parts.