Hi @phario,
Right now you have some of the best and experienced folks applying themselves to your problem. I would go with their suggestions. That doesn't mean I wouldn't like to help. Just a bit of perspective.
With that, here goes:
As @Nige_S pointed out the AppleScript doesn't seem to work. I've replaced it with his correction.
Agreed, it is a total jalopy and possibly a lemon. I've just started to try to work out what seemed so easy in theory and it is not pretty. Another macro that I just uploaded for a different purpose contains a better implementation of the idea of a "controller macro" that launches the conflict palette. It stops short of interacting with the conflict palette, but for the moment it is the better version of the idea. I think it runs, but unfortunately don't have a way right now of testing beyond Mojave. If it does, I am happy to try testing the limits on what it can do. Keep in mind that it relies on GUI scripting to regulate actions, so it's goiing to be prone to issues of timing, not to mention dependent on the GUI not changing. In particular, dealing with the escape key sent to the conflict palette is going to be a potential pitfall.
Anyway, the F7 and F8 keys are only for testing. You can set them to whatever you like.The upload titled, "Launch conflict palette and toggle keyboard have instructions on how to customize the" controller macro".
Apologies, yet again, in advance if the thing continues not to run.