In a lot of countries you are not allowed to just record private conversations with listening devices (and it is not happening as a mass phenomenon), so clearly we can legislate successfully against use of technology.
Indeed, even though murder is illegal, it still happens. But the law is there to codify that murder is heavily frowned upon. Places where legislation were absent of the law isn't sufficiently effective enforced, tend to have more random violence.