Repairing brightness problems caused by auto lighting optimizer
Without knowing the exact result of this, if I where you I would give the GBDeflicker a shot (plugin for AE Win/Mac and stand-alone application):
http://www.granitebaysoftware.com/products/productgbd.aspx

This is a software meant to solve time-lapse flickering by averaging the luminance of the scene over time. For the video you showed as an example this would also be the case, unstable luminance.

You can probably isolate your background or the problem area for this plugin to work on, to achieve even better result.

You might need to adjust end lightness but after running the scene through this I would think that's just a matter of matching the first and last frame setting the keyframes for both.