About 10 years ago I replacde my hot water heater. There is a old blog post on it. For some reason the bottom element quit working so I thought i would fix it. It turned out that there had been a water leak for a long time. The area was completely rusted out so I did not dare touch it. My wife wanted a 40 gallon heater but they are 21" in diameter and would not fit in the space available. However I discovered that there is a narrow 18" diameter 40 gallon water heater that is available at Lowes.
The 12 year old water heater. It had rust stripes below the lower element access cover.