There should be a microcontroller inside the monitor that controls the backlight intensity via PWM. Find that.
Then carefully break the trace and connect in one of the PWM capable pins of the ESP32.
Write code.
Upload code.
Profit?
Of course, you want to make sure that the PWM voltage of the monitor is the same as what your ESP will output. Also, make sure the ESP can handle the current that may be drawn (depends on how it is all set up).