I would use the strobe light effect with the strobe set to transparency. seems to work best with the strobe period set to twice the strobe duration. Whatever you put under the layer with the effect will be revealed about every third frame if you set the duration to 0.1 & the period to 0.2 and you have it set to transparency. Or you can set it to a color.
You can also achieve this with an expression, in various settings.
For instance you have two layers, the top layer being not fully opaque (alpha channel not 100% everywhere).
The expression below, set in the opacity property of the top layer, will hide that layer one frame on 2:
n = 2; f = timeToFrames(time); f%n===0 ? 100 : 0;
But you can also apply the same kind of expression to an effect parameter, or anything that can accept expressions.
For instance, for the Bluriness parameter of a Gaussian Blur effect:
period = 15; // frames lowValueDur = 6; // frames f = timeToFrames(time); f%period <lowValueDur ? 6 : 30;
There are a million ways to do this. Another option would be to add a solid layer on top of your video, Add any of the transition effects like linear wipe with a couple of keyframes so the transition happens very quickly then all the expression loopOut() to the transition. Now use the flashing layer as a track matte for the top copy of your footage.
If you just wanted opacity flashes that were say 2 frames long (be careful you might give folks a headache or cause a seizure if you run it a long time) set a hold keyframe for opacity at the first frame with the opacity set to 100% and a hold keyframe at frame 2 for zero and then at frame 4 set a last opacity keyframe to 100. Then hold down the Alt/Option key and click the stopwatch for opacity to add the expression loopOut() and use that as a track matte for one of the video layers. EZ PZ.
You could also add this expression to opacity Math.round(random(0,1)) * 100