A man sent me a dick pic on Instagram
medium.com
medium.com
I feel like you want a digital 'safe space' like on many college campuses. The real world is much darker than this. There are no safe spaces.
The 'edge case' that you discuss is just reality. The only way around it is to only communicate with a circle of people that you completely trust.
"The problem is that you can't prevent a stranger from sending you something you don't like"
Sure, but Instagram could choose not to automatically display images from strangers. Because of their design, she can't check messages that she wants without possibly seeing a stranger's dick. That, and there's no easy way for her to report them for that message.