Funnily enough HDR already has to detect this problem, because most HDR monitors literally do not have the power circuitry or cooling to deliver a complete white screen at maximum brightness.
My idea is: for each frame, grayscale the image, then count what percentage of the screen is above the standard white level. If more than 20% of the image is >SDR white level, then tone-map the whole video to the SDR white point.
>>kmeist+(OP)
I now present you: HDRbooster. The tool to boost your image to 19.99% BOOSTED highlights and 80.01% MAX brightness (99.99% of SDR white)!