I was also exploring something like this a few years back but for Office files. This exact approach seemed like an absolute win to me, but I ended up not using it, because this won't work in the GitHub web UI. This won't be a deal-breaker to many, but people should be aware of it still. In the end I ended up doing this: https://github.com/TomasHubelbauer/modern-office-git-diff/
I am not sure the internal format of XLSM and how the macros are represented within it, but I would assume they are stored in the form of their source code as a plain text file within the ZIP archive that is the XLSM file and if that's the case, my tool would work with them just fine.