Not sure there's a specific rule, but I wouldn't be comfortable with a sump that close to a main electrical panel. Is the panel well above the sump level? In any case, a general rule for bathrooms is that electrical switches and/or outlets should be farther than a person's reach between that device and any source of water such as the sink, bathtub or shower. You're not supposed to be able to reach a switch or outlet while in the tub or at the sink. My bathroom is small, so the outlet & switches are within reach of the sink, but not the bathtub. I rely on a GFCI outlet to protect me in this case. Bathrooms need GFCI devices according to code for some time now and all your tank equipment should be so equipped. There's no way to GFCI protect your entire electrical panel, so again, I'd be looking to increase the distance substantially between that & your sump. Large amount of water, splashing, pumps running, the potential to be touching both the water & the electrical panel within arm's reach ... looking for trouble/disaster/fire hazard. Maybe not for you since you're aware of the hazard, but your family or children may not be.