Generally, no one should ever have to do this - basically I have one customer who has an enormous macro file and for them this was an issue. For everyone else who restarts their Mac at least once a year (or quits the editor of course), I doubt you’d ever hit this as a problem.
BTW, if you do quit the editor, you lose your undo history, however you still have the dated revisions in the File ➤ Revert Macros menu to go back to previous times, which you can use to go back, copy/export a macro, and then revert back to as it was and then import the lost/damaged macro.