Thanks @jlampel I have started to use your technique to set the strength of the HDRI. It’s really clever!
On the topic of estimating the strength of the main light source and its direction
If we pick a paint PBR material for the wall with a known orientation and the camera location is known as well, shouldn’t the BSDF model of the material let us roughly estimate the strength the light source?
Another way I am thinking is to compare the diffuse_direct + indirect maps with the reflectance map inferred from the image.
I wonder if someone here has already tried to create an add-on like that.