Just imagine all the stuff their food picks up in the wild...probably dirt & rocks and stuff too.
They've got some potent stomach acid in them. Most animals have to break down foods first, but swallowing the prey whole means all that breaking down is done via the stomach acid. Little bit of wood is not a problem hehe.