The router recognizes a device based on its MAC and assigns an IP address. Traditionally, the MAC stays the same, so you’re right. In this case, OP doesn’t want to be recognized by the (airport) router. There is software for spoofing the MAC address for most platforms. Changing the MAC address has recently become more popular due to privacy concerns and on some operating systems it’s supported out of the box.
There are Browser plug-ins for captchas. Haven’t tried any, but in your case it might be worth it to check them out.
I don’t know any specifics about trouble, but would it be good enough to just track the current mode in your own global option/variable whenever you toggle it with your shortcut?
If not I‘d start by taking a look at the trouble source code.