>>11439992really good question. I personally don't know but if you want to hear a guess I'd say it happened several times as soon as the land was habitable to animals because the advantages seem huge and the developments needed arent as unlikely as, say, oxygenic photosynthesis which literally only developed once ever in the history of life (you can show this genetically).
paleontologists are free to correct me.