We have no hesitation is saying that a pool heater purchased from one of the major manufacturers and correctly installed and maintained is 100% safe.
Of course like any heating appliance they can be dangerous if mistreated. Gas heaters produce carbon monoxide so if installed indoors they must be properly vented and when installed outdoors proper thought must be given to the positioning (under house windows is not a good site). Adequate ventilation is essential so it is important to ensure that debris does not build-up around an outdoor heater. They must also be kept clear inside so an annual service by a qualified gas engineer is strongly advised.
Modern gas pool heaters feature a variety of safety features including ignition safeguards, pressure regulators, water pressure relief valves and automatic shut off controls all of which means that in use they are very safe.
Electric heat pumps offer little in the way of danger other than that they are electrical devices and must be respected as such but essentially electric shock hazard is avoided by construction and installation of the heater in accordance with strict electrical standards and codes.
Solar systems are also safe if properly designed and installed. It is quite practical to buy a system and install it yourself without creating any problems.
To ensure ongoing safe operation all pool heaters should be drained over winter to prevent any frost damage.
Many people consider making their own DIY pool heaters, usually solar systems and it is here that safety can be a question mark. All sorts of safety issues can arise such as pumping very hot water into the pool when first turned on.
In summary pool heaters are a safe way to increase the value you get from your pool but need to be properly installed and maintained. Only build you own pool heater if you are confident that you know what you are doing.