How to drop 170V DC to 50V?
Possible solution for the problem is using cascade transistor connection.
Use the 70 volt optocoupler to control a high voltage transistor which in turn will switch the 170v.


In this way your optocoupler will see only about 0.8V. You may need to modify the codes so that the microcontroller will provide active low output.