Unable to set LCD contrast using DAC pin on ESP32
The DAC in the ESP32 is ok for sourcing current but not so good at sinking current, and that is what you need. 

A amplifier set up as a voltage follower would work.