After poking around in the KM Editor for an hour or two I finally found a way to cause a memory leak in the KM Engine. I have no idea if this will work for anyone else, but it works for me.
All I have to do is click the check mark for a macro group to enable or disable the group. Each time I click on it, according to the Activity Monitor application, the KM Engine grabs another chuck of memory, typically around 50 MB, but it can range from 20 MB to 100 MB. Within a couple of minutes of clicking I can get the KM Engine to take up 5 GB of memory. At that point my system becomes sluggish, as I have only 8 GB of RAM. So it gets hard to make the engine go higher, but I have seen it as high as 8 GB this week.
Upon further examination it even leaks memory when the macro group is empty! But not quite as much memory. It seems that the amount of memory leaking appears to be related to how many macros are in the group. Yup, if my group has about 100 macros, the amount of memory lost is about 100 MB per click. Per click!!
This is a very specific report. It should be investigatable. I really don't know if anyone else will see this behaviour. Maybe it's just me. Maybe my macOS is broken.