so you have worked out how to do the attracting ? (your part 1 ?)
I have a way to "lock" them together once they touch....
All you need to do is put the stick after your attract...
You might (probably will) need to also turn off the attract once they are together or the force of the attract will start to push them around (I suggest a boolean along the line of
if close enough and boolean "stuck together" is not set then apply force towards the other one
collision ? apply distance joint and set boolean to true.