I had the same problem with my AO Smith WH. I would see this overheat condition every week or couple of weeks (not daily). A "reset" of the unit restored things to normal for a while. I tried replacing the elements too, but it didn't fix the problem for good. I think maybe the inside of the heater had too much calcium and/rust build up. I didn't drain or flush the tank in the last 10 years of its life (it lasted 15 years). it felt like it had 6 inches of rock at the bottom.
I should have cut the tank open to see what it looked like inside but that was too much work.