Getting macros for Emacs right is an abysmal pita, as the output of the macro must be valid Elisp code. This usually requires a wild mix of expansion/evaluation or not of the macro parameters in the right places. If you have not done this for the last umpteen years, you will (no subjunctive, you WILL) screw up first.
To make the task a easier I tried a macro to (a) dump the macro expansion of your macro and (b) let it go wild.
https://codeberg.org/harald/Codeschnipselnotizen/src/branch/main/elisp/tracemacro.el