Information below is for tank-type electric or gas heater only.
There is a condition called stacking.
This might apply to your water heater or not.
Having authorized service people to your house 3 times suggests more complicated mix of problems.
Stacking is caused when there are repeated short draws of hot water.
As you know, each time any hot water is drawn out of faucet, cold water immediately enters bottom of tank through the dip tube. The dip tube is connected to cold water inlet and runs to bottom of tank.
So all cold water enters bottom of tank close to the gas water heater thermostat.
See illustration of dip tube, that also shows copper thermostat sticking into tank that is connected to gas valve.http://waterheatertimer.org/Clean-sediment-out-of-water-heater.html#flushelectric
Let's say your water heater if fully heated and burner is off.
A short draw of hot water causes cold water to enter tank.
Another short draw. And then another short draw, each draw happens close to same time as other draws.
Water at top of tank is plenty hot, but bursts of cold water get near thermostat and cause thermostat to turn on burner.
Burner heats water and more hot water rises to top of tank. Water at top of tank becomes overheated each time stacking occurs.
Again, a stacking situation may not be the cause of your problem.
However, remember if single-handled faucet is opened straight upward, then that draws both hot and cold water. And cold water immediately enters tank.
Only when the single-handled faucet is lifted with the handle all the way to the right, does it draw only cold water. Even so, some single-handled faucets have bleed-over between hot and cold sides, so hot water is drawn anyway.
Another possibility is that the dip tube ends at or near thermostat, instead of going all the way to bottom of tank. The dip tube should go straight down from cold water inlet, but dip tubes are made of plastic, and some self-cleaning tanks have a curved dip tube or dip tube with perforations that create currents designed to stir sediments off bottom of tank (although this is not proven to be effective deterrent to sediment formation).
Add a comment for more free help.
Also take advantage of fixya phone service.
For a price, expert speaks with you over phone while you work on water heater or any do-it-yourself project.
Fixya is always less expensive than a service call.