The Lunar dev has a variety of recipes for a hardware widget you can build which allows their macOS-only brightness-control app to implement adaptive brightness on any monitor that permits backlight control over DDC/CI. I'm sure a more-motivated and clever person than me could tap into that hardware and use it to drive ddcutil/ddccontrol outputs on Linux.
https://lunar.fyi/sensor