Midras Mazmur 7:16: Mekhilta DeRabbi Yishmael, Midrash Tehillim & Esther Rabbah

בּ֣וֹר כָּ֭רָֽה וַֽיַּחְפְּרֵ֑הוּ וַ֝יִּפֹּ֗ל בְּשַׁ֣חַת יִפְעָֽל׃

Ia menggali lubang dan memperdalamnya, tetapi ia jatuh ke dalam liang yang dibuatnya.

Mekhilta DeRabbi Yishmael

(Exodus 14:26) "And the L–rd said to Moses: Stretch forth your hand over the sea": It will not stand against you and it will not deviate from your command. "and the waters will turn back upon Egypt, upon its chariots, and upon its riders": The "wheel" will turn back upon them. For with the counsel that they thought to destroy Israel, I will destroy them. They thought to destroy Israel by water, and it is by water that I will exact punishment of them, viz. (Psalms 7:16) "He has dug a pit and he has deepened it, and he will fill in the pit he has wrought", (Koheleth 105:8-10) "He who digs a hole will fall in it; he who breaches a fence will be bitten by a snake. He who quarries stones will be saddened by them; he who splits timbers will be imperiled by them", (Mishlei 26:27) "The digger of a pit will fall in it, etc." And thus Solomon says (Ibid. 12:14) "From the fruit of a man's mouth, he will be sated with good, and the payment of a man's hands will revert to him." And thus, Isaiah the prophet (Isaiah 59:18) "As with reward (for good), so will He return wrath to His enemies, payment to His foes — to (distant) isles will He bring retribution." And it is written (Ibid. 65:7) "And I will measure out (retribution for) their deeds, etc."
Tanya RabiBookmarkShareCopy

Midrash Tehillim

"A pit is dug and is excavated. All those who dig it for themselves, the wicked dig it. And in the end, it will fall into the pit they dug. Their toil will return upon their own heads. This refers to Haman, for everything he planned against Mordecai was turned against him."
Tanya RabiBookmarkShareCopy

Esther Rabbah

“The king said: Who is in the court? Haman had come into the outer court of the king's palace, to tell the king to hang Mordekhai on the gibbet that he had prepared for him” (Esther 6:4).
“To hang Mordekhai on the gibbet that he had prepared for him.” It is taught: He [Haman] prepared it for himself, and about him it is said: “Then against himself he readies deadly weapons, and makes his arrows sharp” (Psalms 7:14), and “He dug a pit and deepened it and he fell into the trap he made” (Psalms 7:16).
Tanya RabiBookmarkShareCopy