I have cnc milled PU foam and XPS foam (finnfoam). PU foam is good because it can hold some chemicals, like polyester, but disadvantage is that it will make a lot of dust. XPS can't hold polyester, but its much cheaper, its hard, and it doesn't produce so much dust. I have coat XPS foam with styrospray, it will make very hard coat over the foam.
I have custom build a cnc machine size of 3000x2000x1000mm for foam milling. For me cnc milling mdf is not a choice. with bigger moulds it will be very heavy plug. it will suck moisture. also its easy to broke the cnc machine if something is wrong with the g-code. (and this will happens always sometimes)