The Switch node in the material editor is often underappreciated, yet it enables for very interesting applications. This short tutorial shows how the switch node together with the mathematical sawtooth wave function allows creating the animated painted texture.
https://dev.epicgames.com/community/learning/tutorials/v3pR/unreal-engine-switch-node-sawtooth-wave-and-a-bit-of-hand-painting-for-stylised-materials