It uses voltage monitoring and linear feedback.
The principle is to convert the output voltage to a current through the opto-coupler LED. It could be done with a simple series resistor but it wouldn't be very sensitive because a large change in voltage would only produce a small change in current. The trick it uses is to use the TL431 to lift the bottom end of the LED to a stabilized voltage a little below the output voltage. The current through the LED is then determined by the difference in those voltages rather than the difference in output and ground, making it proportionately much bigger. The TL431 is a programmable voltage regulator with its cathode (top in the schematic) voltage being set by the voltage from R5 and R20.
The CTR across devices, even from the same production batch isn't very precisely controlled so the manufacturer will choose values supporting the worst case and also add on a safety margin. CTR does degrade slowly but to put it in perspective, with 100% on time at maximum rated current, it will drop by about 50% in around 75 years, not something most people worry about!
There are several types of optocoupler which is why you may have used one that wasn't suitable. Basically, they are a LED and a photosensor mounted so the sensor sees the LED light and it is all packaged in a lightproof plastic box to keep outside light out. The differences are in the sensor side, a 'normal' optocoupler has the light shining on the base junction of a single transistor, a high CTR type usually has two transistors wired so the second one works as an amplifier. A digital type has a threshold at which the output side abruptly switches from low to high rather than having a gradual change. It makes them more suitable for carrying isolated data streams but useless for applications where the output has to be proportional to the input.
Brian.