First, those people, although unspecified, actually exist. Creating a hazard for real people is different from taking an action that could hurt a person who does not exist.
Secondly, creating a device with the intent to hurt someone regardless of circumstance or actual threat is pretty morally different from typical home defense, to say nothing of engaging in behavior that could incidentally harm a fetus.