i've bought magnets for fun from k&j (not for this application). they have a useful q&a section on their site.
"Rare Earth magnets have a high resistance to demagnetization, unlike most other types of magnets. They will not lose their magnetization around other magnets or if dropped. They will however, begin to lose strength if they are heated above their maximum operating temperature, which is 176°F (80°C) for standard N grades. They will completely lose their magnetization if heated above their Curie temperature, which is 590°F (310°C) for standard N grades. Some of our magnets are of high temperature material, which can withstand higher temperatures without losing strength."
https://www.kjmagnetics.com/neomaginfo.asp