Could surface mount resistors cause a rise of 10°C
I see a major thermal problem using 12V to drive the LEDs with 560R.
You want to never exceed 50% of power rating of device to operate at 50% of it's 100'C rated temp rise to 125'C from 25'C.
If you want to use 1/8W R's then raise impedance x5
Rin = 2.7 kOhm
Rc= 5 kOhm
For same CTR of 4mA input  to 1mA output = 25%

You can also go lower with Rin=5.4k and Rc= 10k as this uses 10% of 20mA rating as the reliable minimum operating current of LED for long term.