MeanWell PWM dimming
Figure 1. Input circuitry of some Mean Well LED PSUs. Image source: LEDnique.
This circuit can be driven by a potentiometer, a 0 - 10 V (or 1 - 10 V) source or a PWM signal but the end result is always the same: an analog voltage reaches the IN control pin. See my linked article for more detail.
Connect your opto-isolator's collector to CONTROL+ and the emitter to CONTROL- and you should be able to control the brightness by PWM control of the opto-LED.



simulate this circuit &ndash; Schematic created using CircuitLab
Figure 2. Microcontroller interface.
If the GPIO is 100% off the PSU will be 100% on. You can't easily invert that action. (More on this later.)



simulate this circuit
Figure 3. The simplest, no-nonsense method is to use a relay which when de-energised with loss of microcontroller power short-circuits the Mean Well control inputs.