This is a psychological deterrent attempted by the US during the Vietnam war.
https://youtu.be/THMAchwBwgs?si=Z58q1UQf4Y1a0skw
Diabolical? Yes. But if it worked, it would have led to greater success for the American side with less blood spilt.
But of course, the Vietcong weren't stupid enough to fall for this in the 21st century. It was a failure.