Concerns about a pipe that keeps freezing
A simple way avoid freezing is keeping the tap little open (I'd say gallon per hour), because moving water won't freeze.

Another way is to use a 'heated' insulator, so if the temperature drops beyond a threshold, electric heater kicks in keeping the water few degree above freezing point.

Closing the main valve when you go it's not a good thing to do (if you don't empty the cold water piping) because you remove a secondary 'pressure relief'.

Good thing can be emptying only that trunk of pipe that freezes and preventing water passing through it.