If we get to where we can simulate human neural nets (and identify the "scary" neurons) then we could perform gradient descent against those. That's an interesting concept. I don't know if that's been visited in SF, but it has potential. Imagine a set of not-so-random squiggles that causes uncontrollable fear to its beholder.
So when I was back in high school I was playing around with one of the Kai art programs (I forget which one actually) that let you generate different patterns. I couldn't explain why but the patterns that were kind of regular-ish and curvy/abstract (anything that looked like cells under a microscope or those with a honeycomb-like structure) made me deeply, anxiously, almost panic-attack level uncomfortable. This startled me when it happened the first time. There was nothing at all I could logically connect it to.
The best way I can describe it is that I get that deep stomach-fluttery feeling that comes with being really nervous and apprehensive, but without any of the emotional content of anxiety at all.
I forgot about that experience for a long time, until the first Google 'Deep Dream' images were released. Turns out that the Internet has given this a name - trypophobia (fear of holes). The regular, not-quite-identifiable quality to the images is what seems to do it to me.
Even now, my stomach is fluttering like I'm about to go on a scary roller coaster. Again though, this comes with no emotional panic. I'm not upset by it, it isn't self-reinforcing like anxiety is. It's just a really odd feeling. A very strong 'get away from this' feeling.
I've read the hypothesis that this comes from an instinct to avoid danger, such as beehives and poisonous creatures and that makes a lot of sense (not totally sure from memory though so I might be getting it wrong; I need to find the study I'm thinking of).
So I don't doubt that at least for some people it's possible to synthesize images that provoke a strong physiological response that could make them flee.
Sort of related: Instead of visually producing fear, you can also do it with sound.
Research "Binaural beats: Gates of Hades" I literally threw my headphones off at like 25secs.
I know you could literally mix trypophobia images and Gates of Hades to produce a waterboarding like response.