A possible reaction of heating Terephthalic acid
Following are the Statement from “On Terephthalic Acid and its derivatives” By Warren De la Rue and Hugo Muller February 7, 1861:

On heating, terephthalic acid sublimes without previously
fusing(melting). The sublimate, which is indistinctly crystalline, has
the same composition and properties as the original acid, and
therefore, unlike other bibasic acids, terephthalic acid cannot be
converted into an anhydrite by merely heating it

Terephthalic acid when pure is white opaque powder, insoluble in water and it sublimes at $\pu{300^{\circ}C}$ without melting.
When heated to decomposition it emits acrid smoke and irritating fumes. $\ce{FeOOH}$, nickel hydroxide and nickel oxide are suitable catalyst for thermal decomposition of terephthalic acid (at low temperature) but since nickel compounds are expensive so $\ce{FeOOH}$ is generally used. At higher temperature (in absence of catalyst) Terephthalic acid$\ce{_{gas}}$ is decomposed to carbon dioxide,benzene and benzoic acid.
For further reading refer to this more in depth paper
&quot;Determination of the Thermal Decomposition Products of Terephthalic Acid by Using Curie-Point Pyrolyzer&quot; by Mehmet uluturk