A somewhat related story: When I was a freshman in college I lived in an all-male dorm. I went to a state college and it had a reputation as being a "party" school. I can believe this because the freshman dorm was such an alcohol-induced party atmosphere that it would have put "Animal House" to shame.
I am a non-drinking, notoriously introverted non-party person and was absolutely miserable there. People within the dormitory tended to socialize mostly with other guys who lived on their floor. Normal social inhibitions did not seem to apply when it came to other people who lived on the same floor you did (I think this was encouraged because it was a group showering situation with others on the same floor). My point being that this floor was as lewd, crude and rude as 19 year old boys can be. Just so you get the picture...
Anyway, one day everyone was gathering in one dormitory room on the floor and my roommate (who I got along with, but didn't like) insisted that I come along, so I did.
Well, it turns out that they had bought some porno films (actual projection films, this was in the 80's before video was everywhere) and we ended up watching these movies together. Well, not too long into the movies, guys started bragging about their woodies and showing them off to everyone (through their pants, thank God...) and bragging about how big their dicks were.
They asked me if I was erect, and I told them No. I noticed they kept looking at my crotch to see if I was getting erect, and I never did.
I would have sooner slit my wrists than get an erection in front of those @$$!@!$. I didn't like them (and found out later that the feeling was mutual) and frankly found the idea of guys bragging to other guys about the size of their dicks to be a little strange, unless they were homosexual (and to even suggest that would have gotten me beat up, of course).
At any rate, I was not a homosexual and I did not want another guy seeing my erection, especially not a guy that I detested. And God forbid that it happen in front of a whole group of them!
My point being that even given visual stimulation, if you are uncomfortable with a situation, and do not want an erection, you are not going to get one, short of being physically stimulated to the point that you have no choice (which I suppose could occur in a doctor's office, but has never occurred to me).