Not quite true- they have very effective digestive enzymes for what they normally consume (animals), but cannot digest plant materials (including wood)- they lack the enzymes to do so. Small pieces they may swallow incidentally get pushed thru along with food waste, but in some cases they may cause an obstruction that requires surgery. And sharp or splintered pieces can perforate their digestive tract, causing infection & death. Truly that's best avoided.
I think it's safe to assume that it happens in the wild snakes too- that debris gets swallowed along with their prey, but we also know they don't live as long as our pets do. Don't we want the best life & health for our pets? Or would you rather risk your pet needing an expensive surgery with an uncertain survival?