The fact that it is taking 5 minutes to deliver hot water to the shower rarely has anything to do with a tanked water heater and is instead because of the distance between the water heater and the shower. (Also depends on whether or not those pipes are exposed to the elements, as the hot water will have to first heat the cold pipes before it can deliver hot water to the shower. Raising the temperature setting would help heat the pipes faster, but that would nonetheless be a problem with the setting, not a problem with the water heater that would warrant replacement if it were the only problem.) That aside, either the water at the top of the tank is hot or the water heater simply isn't working. (Hot water, like hot air, rises. If there's one place that hot water should be at, it's the top of the tank, which is where the hot outlet draws from.)
Water heaters typically go bad for two reasons:
(1) Not changing the anode rod, leading to corrosion that eats through the tank. If you haven't had your water heater's anode rod replaced (typically about every 10 years), then this thing is a ticking time bomb, and it will fail very soon.
(2) Sediment covering the electric elements / gas burner, at which point performance will be reduced. This will often cause "popping" noises, as the elements get quite hot and then cause water trapped within the sediment to almost instantaneously boil, causing a tiny explosion as the water turns to vapor. In electric water heaters, this will pretty much cause the lower element to be completely useless, as it becomes buried under more and more sediment, either becoming thermally insulated from the water that it's supposed to be heating or outright failing due to excessive temperatures. The common symptom of this in electric water heaters is that the hot water will quickly run out, as only the top element is working, and the hot water stays near the top. I haven't worked with gas water heaters much, but the logic is pretty similar... sediment and scale is going to cover up the surfaces that are transferring heat from the burner to the water, and you're going to lose a lot of efficiency. (To make matters worse, your water heater probably only had about a 50% AFUE [annual fuel utilization efficiency] rating when it was new, and if it has any sediment problems, it's probably down to 25%. By contrast, a new gas water heater will have 75-90% AFUE. Ergo, I would say it's worth it to change the water heater on account of efficiency alone.)
Note: Some of this depends on location -- the harder the water, the worse these problems will be.
If you don't have a water softener, you should immediately replace the unit.
If you have a water softener, the unit might still have problems, and even if it doesn't, I would replace it on AFUE concerns alone. If you don't want to replace it, though, you MUST at least have a plumber come install a new anode rod and T&P relief valve if you have not had the water heater serviced recently. (If your T&P relief valve is scaled over or has otherwise failed, flooding should be the least of your concerns. A failed T&P valve can lead to a BLEVE [a type of explosion], which would pretty much flatten your entire house and possibly kill everyone in it. See below.)
PS: What you want to use as a temperature setting is up to you, but you should keep it at at least 120-125F, raising the temperature up to 140 degrees Fahrenheit once a month to ward off Legionnaires' disease, which carries a 30% fatality rate.