Good idea to control LCD contrast using a microcontroller?
In most examples I've seen the contrast control line has been adjusted automatically by a thermistor: -



This picture came from here - it describes how the circuit works and shows its output compared to the typical theoretical requirements for a typical LCD.

You can of course use a micro but you'd be copying most of the circuit above, reading the analogue value into the micro thru an ADC pin then outputting possibly a PWM signal that can be low pass filtered then fed to the LCD. Can't see the need to over complicate it really. Stick with "simple". Simple is usually best!

Here's another page that uses the same circuit. Here is a computational tool that can help - slightly different circuit but the tool, I'd imagine, will give you values.