You upload the macro using ntfy.sh (preferably with a random ID), send a request to every device with the ID.
The devices all download from the link (the only problem is that the file disappears after 3 hours so you have to check for that too), then replace the old with the new macro by manipulating the macros.json (contains allemand macros) file.
Ideally for the first macro you should directly put the OS macro into this file so that you can delete it with the delete macro action (ID never changes).
Basically it's a bunch of pretty complicated stuff but if you have the dedication you should be able to set it up (although it will only work with primary user installations).