You could probably do it in Rule Machine, it will be pretty complicated, and will possibly cause the rule to run multiple times concurrently.
I dont think there is any way to do it as you have written in RM, maybe in Webcore?
You would need to setup a trigger for every device, when lux changes
You could then pull the value from every device into a variable.
Then I think you would need to go through each one, one at a time and setup the multiplier and save back to same variable.
The device count would probably just need to be hard coded (or a manually set variable)
That doesn't even take the lamps into account.
Best thing would be to have a custom app that does it and stores the value in a virtual light sensor.
I agree with @jtp10181 that a custom app is probably the way to go. With that said, outside of the adjustment request, you could use HubitatPublic/example-apps/averageIlluminance.groovy at master · hubitat/HubitatPublic · GitHub from the Public Repo to get some of this. Setup as many instances as you need to cover all possible options, and then, have one massive rule for the variable with If-Then and a bunch of Else-Ifs to cover all instances you created. I would be very concern with the rule running concurrently.
In writing all of this out, a custom app definitely seems like a better approach, but the above might get you close.
Re. using rule machine... given the complexity and number of devices (both greater than the pseudo code), I was never considering triggering the rule via Lux or lamp level changes; I'd have it run every minute (ie., as a cron job). Eliminates the possibility of concurrent execution and that's low enough latency to populate the averageLux variable for other rules to query.
Yeah good point, having it run on a schedule would be a far better approach and might make it more feasible to do with RM. Still going to be a very long and complicated rule.