For context, I need to solder a wire onto a pcb. However, the pad was destroyed during demounting the original component (picture 1). The plan B is to solder the wire onto the copper trace next to the pad. I am however worried that
A) soldering alone won't be sufficient for a durable bond.
B) that the piece of exposed wire/trace might interfere with something.
At the same time I have this guy lying around (picture 2) and noticed that it also has wires soldered onto the board, with some glue(?) being used for, as I understand, similar reasons. What is this substance, and would it be suitable to use in my case?