I wrote an ffmpeg filter which attempts to do this. It's not perfect, but it does seem to work well with a good part of the test samples I was working with.
It has now been included into ffmpeg, and should be available in the next release.
With mpv, you can enable it with:
mpv video.mp4 --vf=photosensitivity
The filter can be made more or less strict by ...