Thank you for PySceneDetect!
Here's an simple implementation of PySceneDetect in the Blender Video Sequence Editor:
https://github.com/tin2tin/shot_detection

I just used your example to do the detection with a fixed threshold of 30 for now, but let me know if there are something obvious I missed for better optimations.