Earlier quoted context omitted.
The grandparent post wasn't asking what would happen if you woke up at 3 AM and shot a policeman mistakenly. He was asking whether it would be legal to rig a booby trap to do it! Those are extremely different situations, to say the least! You're arguing with a straw man.
As I interpreted it , the grandparent post foolishly tried to express his more general question by coming up with a silly hypothetical^ device. The purpose of the device was to injure a police officer as a result of the home-owner not being aware of what was going on. I've taken the hypothetical device out of the question by pointing out that there are real-life situations where no-knock raids have causes unnecessary…
I should have stuck with the Microwave example below, that's cooler anyway.