Capacative proximity sensors - affected by heat?
There may be other concerns.  For instance humidity.

I would recommend not using a capacitive touch switch if measuring distance is a concern.

Capacitor touch switches are charged and discharged continuously. Parasitic capacitance changes this and it is the changes that trigger the switch.  Anything that changes the parasitic capacitance will change when and if the switch will trigger.

Consider the micro soda dispenser.  It has a capacitive touch screen.  But when it comes to dispensing ice or liquids the machine relies on electrical contact switches.

Assuming you want to integrate a switch into your print head assembly but want it out of the way (i.e. non contact). I would suggest an optical parallax type detector.  Sharp makes several for various ranges.  Select one for close range and higher resolution.  Note, even though the Sharp detectors have an analog output, the output is "stair stepped".  This granularity may get in the way of your requirements.  Take it into consideration when designing with this part.