How to control the display's backlight in the sketch?

Yes this, I'm pretty sure: the trimmer's input is 3.3V, output is LED-A pin,

I agree with the other poster that this is a terrible design. The LED(s) probably suck in a lot of current. For the trimmer approach to work, its resistance has to be fairly small.

Do you know if the wiper goes to the LED or one of the terminals goes to the LED? Essentially you want to know if the trimmer is used as a variable resistor.

which probably stand for LED Anode.

Yes. That's correct.

If I put a wire between LED-A (pin19) and GND (pin 1), the backlights turns OFF.

If the trimmer is used as a divider and the wiper is at the top, you have just shorted the power supply.

I think you can use a pwm pin to power the led and software control the duty cycle. That requires some resistance on the led, and some limit on how much current the led can draw. If the timmer is wired in right, you can use it. Otherwise, you can cut the trace and wire in a resistor.