In days gone by when there were plenty of wooden gates and other woodwork each district S&T department would have a carpenter or two at their main depot. As the number of gates and other items that might require their attentions declined the number fell, but they were still around in my days in the early 1980s, although often acting as lookouts or as an extra couple of hands to carry stuff from the van to the worksite. I suspect that nowadays, with the possible exception of places where there are a lot of jobs that might require the attentions of a carpenter, the work is sent out either to some central Network Rail/GBR depot or to an approved external contractor.
There are disadvantages to just getting any old local in to do the work and it’s not just union rules. You need to be sure that they are going to do a good enough job and mere local repute doesn’t mean that that Old Joe can do a satisfactory job, but checking him out would take up everybody’s time and money. Possibly even more importantly, at least as far as the Operating Department is concerned, is that you don’t want someone wandering around the track who has not been taught how to look after themself and how not to damage equipment. Local labour has done work, but often under supervision.
They are changed when necessary, but wear and tear varies and this could be quite a few years at some places and only a couple in others. How good the original workmanship was and how good maintenance is, including painting, will also affect things. They also have to be replaced if seriously damaged: I have heard of one that lasted less than twelve hours after replacement before a lorry hit it.
Note: I only operated them (and only barriers) and I moved about a lot (to prevent my mistakes catching me up).