The official way for patches to survive an upgrade, is to not patch the stock macros directly, and instead copy pieces out to separate user macros, and load the user macros. When upgrading, find the original pieces in the stock macros, apply the new changes to the user macros, and reload the user macros.
But it's true, in many cases it is difficult or even impossible to reasonably pull out pieces into separate user macros.
The way I do it is by keeping the entire SE installation under source control. I briefly explain how
here, but lately I've been thinking I should probably start a topic that explains in more detail how and shares two helper macros I use in the process. The process is simple, mechanical, and smooth; all you need is a source control repository where you can store the stuff (and the source control system must support applying changes/patches from one tree to another -- e.g. Perforce does, and is free for up to 2 users), and the rest is mostly automated. (Of course, if you get ambitious and make complex changes then you might get some merge conflicts, but that's to be expected). Using a lightweight process like this, your don't lose your patches to stock macros when upgrading.
Getting back on topic:It's an interesting feature request, for the editor to natively support carrying patches forward somehow. Ideally, it would be possible to overlay/override anything about any stock macro, using a separate file, i.e. without needing to directly modify the stock macro file at all.