Secure a surface mount component to a plastic surface
As @JackB correctly guessed, the pads actually sat on a thin round PCB. It has the same color as the amber-like filling mass so it was indistinguishable from it until I scrubbed it all off and found out that indeed, the thing that is beneath is actually something different.

It was glued to the plastic, so all soldering had been done away from it, making the melting problem irrelevant.

Here it is, with the new component soldered in: