Dehydration is actually a much bigger culprit than people realize. Sure, an awkward object can become lodge in the gut and cause an obstruction, but typically poor hydration is a big player. The better lubricated things are, the better. So making sure water is always reaily available is always a good idea, not just in this case but for overall, general health.
However, not ingesting things like rocks, sticks, fake leaves, etc. is an even better idea. Last year my puppy ate a large man's tube sock and was on an operating table a few days later. So you want to keep them from potentially eating things that are indigestible and/or solid.
We don't recommend having small pebbles on the floor of the cage, for example, for this reason (where the chameleon could swallow a rock instead of a cricket because of a miss). Or having fake foliage if you have a leaf-eating chameleon.