@michaelb Michael, I did a Google image search. Could this possibly be Deanolis sublimbalis, Red-banded Mango caterpillar - a moth? There is one image of these in wood rather than mangoes. https://www.planthealthaustralia.com.au/wp-content/uploads/2020/01/Red-banded-mago-caterpillar-FS.pdf
See http://lepidoptera.butterflyhouse.com.au/coss/coss-cats.html although I suspect intermediate instars of a number of Cossid species do this white to red change, going through a stage of alternating red and white bands like those shown in http://v4.boldsystems.org/index.php/Taxbrowser_Taxonpage?taxid=89495