Many glues will hold onto the plating of the things. CA, Epoxy, Sillycone
Bigger issue is to plan on eventually having to replace them.
Platings will flake off ,sooner or later, then the exposed to air neodym magnet material will start to oxidise/crumble into toxic powder.