Magnetic flux loss and thermal instability in motors drive high replacement costs, which are mitigated by engineering the grain boundary phase of rare earth magnets. Precise control over the elemental distribution within the permanent magnet lattice ensures high coercivity and operational reliability.