A high voltage electric fence plus moat filled with alligators surrounding them.
Self defense is permitted to minimize harm to all parties.
How efficient.
Now, let's say we are not talking about the rapist farmers, but instead a different village/community.
Community A with their moats and electric fences also have come to a consensus that they should have restrictions on the pollution they tolerate pumping into the atmosphere for the sake of the health of all the community members. They all agree that a violation of this consensus should result in shunning.
Community B has no such limitations on pollution. They burn all kinds of hazardous chemicals into the atmosphere which flows downwind to community A's territory. Perhaps they also dump harmful substances in the river that flows downstream to community A which happens to be their water source.
Community A shunning community B has no effect because community B is self-sufficient. What should community A do now? Live with pollution flowing into their territory for which there is no realistic technical way to stop? Relocate somewhere else further away from the polluters? What happens when land gets crowded and there is no where else to go?
What counts as self-defense anyway? If the pollution is harming the health of the community A's members, are they morally justified to use self-defense to minimize harm? Self-defense in this case meaning physically intervening with community B to provide the necessary consequences to get them to stop.