Even dog shit in a trash can is super polarizing. This was the first comment I saw even mentioning asking the person nicely to stop first. Like maybe put up a sign saying ‘No dog poop please’ before making a threat or a thing meant to bother the dog.
Maybe try asking them nicely first, or putting up a sign that doesn’t have a threat in it? Like, I get it, someone slighted you so you got to make them think twice before crossing you again, but going straight to building a trap with razor blades is a bit extreme and will probably land you before a judge.