Add a Brightness and Contrast filter or a Color Curve filter to the track or event level and keyframe the changes.
I'm unaware of a tool to do it "automatically", though the folks that shoot time lapse videos have to deal with those issues, so there might be tools like this one.
Thank you @3POINT for pointing that out. I haven't used that VFX for a while so wasn't aware of the Automatic Contrast function. It looks like it was introduced in VP18. I am keen to try it out to see how it performs against the keyframing approach to adjusting contrast and brightness.