DDCMQTT is a little server program that sends DDC commands to monitors in response to MQTT messages. This allows you to, for example, change brightness and input from whatever custom scripts/hardware/control system you want.
It works, on a RPi 4, and is in daily use by the author. Code's a bit messy.
You'll need a working Rust environment, or Nix. Run
cargo build or