Such software would no longer be open source (canonically defined by OSI) or free (canonically defined by the FSF), and it would cause all sorts of problems for developers as it would be incompatible with other licenses such as the GPL. And it would be impossible to somehow enumerate all "evil purposes" in a licenses, and if you theoretically did, virtually everyone else would disagree with at least some part of it.
We're willing to devote a lot of time and effort to solving hard technical problems, we should be at least as willing to use some of that energy to solve the associated social problems as well.
Here's the thing: technological expertise in no way implies social expertise. In fact anecdotally they are inversely correlated. Technologists would benefit from moving in the humility direction outside of their chosen field, they are already hubristic enough as is.
For what it's worth, this phenomenon is widespread beyond technologists. It's easy to think that because you're really good in one field, that you must be really good in other fields too. But sadly it generally isn't so.
You can make more narrow restrictions, but those will still have a way of backfiring or having unanticipated results anyhow, not to mention that I'm yet to see one of these sorts of licenses end up on a product where it actually matters anyhow.
Practically and legally speaking, there's no lever here to discuss the misuse of. I mean, heck, I'd give you at least a 25% chance these things were already developed in a context that doesn't permit open source to be used anyhow.
So the authors of busybox, linux kernel, display drivers, and all of the myriad open source components used are responsible for basically every embedded hardware product in the world?
https://news.ycombinator.com/item?id=3559904
It’s a hard space to define and navigate, as the comments indicate.
BUT, maybe there's room for a reasonably permissive proprietary license that is based around moral restrictions. Plenty of people still use proprietary software; so if you're already doing that, I could see a semi-open "ethics license" fitting in. You couldn't include it in other GPL or MIT licensed libraries, but again, if you're already building proprietary software, those restrictions probably don't matter to you.