use a converter with a photocoupler in it.
when possible use a simple heatshrink tube around the sensor
ground the thermocouple on one side and use a groundfaultautomate of 30 mA. Still advisable when you can touch metal parts when machine is not double isolated this is mandatory.