
The best method to use in prevention of self-demagnetization of a permanent magnet is by use of a keeper. Keepers were also commonly known as amateurs. They help in storing magnets safely, especially those that have low coercivity ( magnets that are extremely susceptible to stray fields).

Hope It Helps!