Thermal Effects on the Phonon Polariton Response of Nanoscale Cavities