I've switched to coconut fiber recently since I can get it in large amounts cheap. What you said happens occasionally but I don't think its really a serious situation. I've had similar situations with other bedding. For example, I used to use a fir/sphagnum bedding. It was expensive but I had good results. Due to its rougher texture I never had the "mouthfuls of dirt" scenarios like I see every so often w/ coconut. But...one time my BP missed and hit a little piece of fir bark and got it nailed down on his lower front teeth. This sucker was not coming out with the standard mouth-rubbing routine. My snake was so pissed it worked on it for a good half-hour before giving in and consuming the mouse with a dirty mouth. In the end, I had to forcibly remove the piece of bark.
My theory along these lines is that snakes eat off of dirt and twigs in the wild and therefore are equipped to handle the occasional mouthful of substrate. Of course, you want your pet to reap some benefits from captivity but it is important to remember what they are built for. I'm not flaming you for switching to another substrate. I've considered it myself for this very reason. But, I think the finely ground nature of coconut fiber probably makes it a low compaction risk. And, coconut fiber has some excellent properties such as moisture retention and bacteria resistance. In addition, it packs nicely which I like. Some beddings allow the snake to slowly burrow down towards the heat source under its hide which makes tricker to safely heat the cage.