Here "wicked" is a nominal adjective that refers to any wicked person. A wicked person acting to harm other people is spoken of as if the wicked person had made a trap and then fallen into it and been unable to escape. This can be stated in active form. Alternate translation: "when a wicked person tries to harm other people, his actions will end up harming him" (See: [[rc://en/ta/man/translate/figs-nominaladj]] and [[rc://en/ta/man/translate/figs-metaphor]])