Here is a solution for water not freezing - run a water loop in your compost pile using a thermosypon ( hot water rises cold water falls a simple coil of pex or even copper tube and a good compost pile the heater system is sealed, the tube on one end is just laid in the trough throw some rocks/bricks on top for weight and thermo mass. Look up solar water heaters anything form the 80s energy crisis period will show a solar panel. just substitute a compost pile and then put a small hose valve to control the water flow thru the hose. watch the temp it could get to boiling. Could warm the barn with a couple of pipes in the right place with hay on top. The photo industry used to have faucets that had temperature control valves that were adjustable, something must be available over the counter