By far the safest thing is to buy an actual heated bucket -- one of the blue ones with the heating element sealed into the plastic of the bucket. They work really well IME.
I have two 100gal 'rubbermaid' tanks (the big black plastic ones) with the heaters that screw into the drain plug. Love'em. I've had smarty pants type folks tell me "OOOOH you're gonna 'lectrocute your goats!" because...yanno...it kinda looks like a big stove element down in the tank.
My stock reply is "Do you have an electric water heater in your house?"
Yes. Why?
"Have you ever seen the elements in an electric water heater?"
That usually gets people thinking and/or shuts people up.
I agree with the blue buckets with heat coils built in and plug in cord covered in non chewable metal coil. They work great.. does not heat water but absolutely keeps water unfrozen! They have been a god send to me in a couple horrificly cold winters where it was actually single digits inside a closed barn! Those suckers came out early this winter.. use a large flat backed one for the main herd and a small round one for the boys.. I also have the plug in water heaters and put 2 into a 5 gallon bucket of water to give out 3 small buckets of warm water morning and night.. my goats love warm water and I know too that they are consuming water even in cold water... kind of like a hot tea on a cold day! and yes I bought my buckets and heaters at TSC... actually some of it was Christmas gifts a couple years ago!! my kind of gifts!
Sign up at Tractor Supplys website and you can get a coupon for $5 off a $25 purchase. The 5 gallon buckets are about $35 here so $5 off is a good discount.
I use them and love them. I have 2 - 16 gallon ones, one in the boys pen and one in the girls pen and I have 5 gallon ones in the kidding jugs.
Make sure you do not overload your circuits. I also recommend a thermocube that turns off the power when the temperature is 40 degrees. Saves lots of energy.
I do not know about the small blue buckets (I *own* one of the bucket ones, just never checked ), you'd have to look at what the mfr says, but I know that the muck-bucket size versions have a thermostat built in.
(I have two for my three horses, and LOVE LOVE LOVE them)