I found a 50 gal electric with 4500w elements running on old 12ga cloth covered romex a few months ago.Don't confuse the ampacity of 12-gauge Romex wire, 20 amps, with 12-gauge copper wire that has higher rated insulation, 25 and 30 amps. Appliance manufacturers do not use Romex for internal wiring.
It had been working for years. The wire was approximately 25’ from the service panel.
I didn’t leave it that way but it was infact working.
I installed 3800w elements in the new heater, removing the 4500w factory elements. I replaced the 50 with a 40.