I just saw a news story where the property owners had made detailed plans to trap the robbers, who had robbed them repeatedly.
They had made dumb statements, according to this story, about how they would deal with them.
Most jurisdictions take a dim view of entrapment where violence is part of the plan.
If they had set up a security camera system or something similar.....but setting a trap that ends in a death or maiming is frowned on.
They are really lucky they did not get charged by the grand jury.