That is a good idea. I am familiar with JB Weld. I tried to reglue those magnets before with super glue but, super glue dries very fast and the magnets are very small. It can be like surgery. If you are not quick enough the glue will dry before you get it fitted in place.
I've glued lots of magnets with super glue and it works wonderfully if you let it sit for 24 hours undisturbed at room temperature.