The water heater element is going to ground and pulling high current.
This is the extra current that is over heating the wires. I highly recommned replacing the element immediately.
You don't want to over heat the wiring
You have two circuits, one is through the element and one circuit is the element to ground.
Replace element right away.
I replaced the element, but nothing changed.
I want you to measure the current on this circuit at the breaker panel. First measure the hot wire from the breaker. Then measure the current on the neutral white wire. Are they equal? If not measure the ground wire for current.
The hot wire draws 16 amps, and the neutral wire is 16 amps.
That is normal, this should not over heat the wire, as long as it is #12 AWG. Normal reading here. Teh only thing that may have happened is loose connections in wire nuts, causing heat and melting. That's what I suspect here.
You old element was going to ground also because you had 9 amps on the ground wire. It cannot do this unless the element is grounding out, and current returns on the ground wire. Normal is what you see now, equal hot and neutral amps.
I still have 9 to 16 amps on the ground wire. All wires are still hot to the touch when used. Changing the element did not change anything. I have turned it off except when needed for short periods of time.
One of the thermostat wires is grounding then. You are going to have to use your ohm meter and trace the ground fault out. Here's how:
Turn breaker off at panel. Then at water heater open the top box where the thermostat is. On mid range ohms setting, touch the hot black feed wire and the ground wire with leads. Should read ∞ ohms (infinite). You will see some ohms value to ground on your meter. So start isolating the black feed wire, start by unhooking the thermostat and then read ohms each way, wire to and wire into thermostat. Continue this until you see where the hot is going to ground. Also test the element to ground with it unhooked from black and white coming to heater. Just read the circuit through the heater to ground.
Must be unhooked from white wire feeding to breaker panel or you will read a ground.
The white neutral is grounded at panel so make sure you unhook it at water heater to do this testing.
There is a ground inside on the element or the thermostats.