The only reason for substrate is to set up a bio active substrate. This is where you have bugs that earth the chameleon poop and it becomes fertilizer for the soil.
Otherwise, the cage should have no substrate at all. This makes cleaning and drainage easy and prevents the possibility of you chameleon eating the substrate and becoming impacted (intestinal blockage) which usually results in death.
I really recommend doing a bioactive setup. It helps keeping the cage clean and makes draining the water out really easy. Here's a good video on how to do it. This channel also has other great videos on the topic. I have a bioactive setup myself and have done quite a bit of research so if you have any guestions feel free to ask.
I feel like the issue of eating substrate is greatly over exaggerated. These things would be falling out of bushes dead left and right if it were really an issue. If your chameleon has a habit of eating substrate, I would bet there is a mineral deficiency, humans do this too.