Getting 502 error on the Smush page

I have 80 000 images on my site, and when I open Smush page in WordPress dashboard, I’m getting 502 error. Previously, you’ve provided me with a hotfix fo this issue here:

https://premium.wpmudev.org/forums/topic/502-error-while-trying-to-load-wp-smush-pro-settings#post-1314234

But the plugin’s structure and code has been changed, so it’s not relevant anymore. Could you provide me with a fix that is relevant for the latest Smush Pro version.