Can an electrical subpanel go underneath plumbing?
The National Electric Code strictly prohibits the installation of water piping above the service equipment you described.
Art. 110.26(F)(1)(a) states:

National Electrical Code 2008
Article 110 Requirements for Electrical Installations
II. 600 Volts, Nominal, or Less
110.26 Spaces About Electrical Equipment.
(F) Dedicated Equipment Space.
(1) Indoor.
(a) Dedicated Electrical Space. The space equal to the width and depth of the equipment and extending from the floor to a height of 1.8 m (6 ft) above the equipment or to the structural ceiling, whichever is lower, shall be dedicated to the electrical installation. No piping, ducts, leak protection apparatus, or other equipment foreign to the electrical installation shall be located in this zone.
(b) Foreign Systems. The area above the dedicated space required by 110.26(F)(1)(a) shall be permitted to contain foreign systems, provided protection is installed to avoid damage to the electrical equipment from condensation, leaks, or breaks in such foreign systems.

You can place the piping from the toilet above the electrical panel provided it's located above the 6 foot high dedicated space, and provided it &quot;is installed to avoid damage to the electrical equipment from condensation, leaks, or breaks in such foreign systems.&quot;