It is safe if constructed carefully. You would not want the light bulb touching the metal. This way if the bulb breaks, it does not short to the ground.
The VERY IMPORTANT part in using any outdoor electrical items, is a GFCI protected electric supply.
It very minute things seem to be wrong, the GFCI circuit shuts the power off.
There are other options to keep water from freezing. A very commonly used one is a Stock Tank Heater. The added advantage with such is the thermostatically controlled operation. Only heats to a certain temp, and off when that temperature is reached.
There are ways to have a Cookie tin work in a similar fashion, but that gets involved in wiring in a temperature control.
A shortcut to that would be a Thermal Cube. It is so so able to control the water temp to some degree. It would be a trial and error on getting the ideal wattage bulb to your temperature ambiance.
My personal suggestion is what I currently use outdoors. It is thermostatically controlled, so only heats water to a certain temp, as well as not heat when outdoor temps are warm.
WISHING YOU BEST,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
