I helped someone do something similar. Although, it was more basic and used blocks for wires instead of more realistic wires. It might help.
This is the original version. It explains the concept.
https://forum.gdevelop.io/t/collision-instance-and-animation-solved/57043/8?u=keith_1357
If you scroll down further in that post, there is a more advanced version.
https://forum.gdevelop.io/t/collision-instance-and-animation-solved/57043/12?u=keith_1357
You could use collision to detect links or IDs or the built-in linking system.