MDF is fine to use once it's sealed.I have enclosures nearly 10 years old and they are still like new.One of the biggest breeders in the country also uses it.
Pretty sure the dust from cutting melamine isn't real good for your health either.
I agree even using melamine if the joins are not sealed properly you will still have problems, I would suggest that if your enclosures are checked regularly and spills ,excrement etc cleaned ASAP, it shouldn't be a problem, I would also suggest that you cut all of your panels and paint before you construct it this way you can seal the edges that are going to butt against each other and then run a bead of no more gaps after construction, even if using melamine seal the cut edges before construction.