What is "Gumatz"?
Rashi: It is a pit. Ibn Ezra - this does not appear anywhere else in Tanach. "Chofer" proves that it is a pit - "Bor Karah va'Yachperehu" (Tehilim 7:16).
Does one always fall in the pit that he digs?
Rashi: Sometimes he falls in it. I.e. sometimes one plots evil, and in the end it comes on him 1 . In the end, Nebuchadnetzar's seed was destroyed via the Kelim of the Beis ha'Mikdash - "v'Al Marei
Seforno: He dug a pit for someone else to fall in it, and he falls in it. Rid - Haman planned to kill Mordechai [on a giant gallows], and in the end he and his sons were hung [on it].
What do we learn from "u'Foretz Gader Yishechenu Nachash"?
Rashi, from Avodah Zarah 27b: One who breaches Chachamim's fence (transgresses their words) is Chayav Misah bi'Ydei Shamayim. Because the verse discussed breaching a fence, it discusses 'payment' of a snake-bite; snakes live in holes in breached walls.
Ibn Ezra: This refers to the officer who did the opposite of Emes (5). He breaches the fence that early Chachamim built.
Rashbam: One should not breach fences, lest snakes found in holes in the wall bite him.
Ri Kara: One who digs and breaches, he thinks that this will help him, and he stumbles in it, just like one plots evil, and in the end it comes on him.
Rid: One who sees proper things, and he envies and wants to ruin them, so people will be damaged, in the end the damage will come on him and he will die.
Seforno: Similarly, one who breaches a fence, a snake that was hiding in it, it bites him.
Metzudas David: He breaches a fence in order that snakes that live in the holes will come out and damage people 1 . The snake will bite him! The matter is repeated in different words.
If so, he should destroy the wall, so all the snakes will come out! (PF)