A number of years ago I had a cyclic brake problem, whenever I applied the brakes they cycled "on" and "off". Took it to a shop in Tucson and had it fixed!
One of the brake wires inside one of the drums had been rubbing on thr brake magnet arm had its insulation rubbed off. On brake application current flowed and the brakes worked, as the brake magnet arm moved it contacted the insulated spot and shorted the magnet effectively denergized it. As soon as the magnet deactivating it and removing the "short" it reapplied the brakes etc.
They rewired the magnet and placed the wires in a way that it would not rub the insulation off.