I have RM3 models and I use homebridge. The broadlink plugin works as you’d expect. Using the learn command, you then point the remote at the broadlink device and press the button you want to learn. The IR code (a long string) appears in the server log. Then you can copy and paste it to save it wherever you want. So in theory your idea is sound. But the official broadlink app won’t support revealing the codes.
Thanks for pointing that out. I just blocked them too. Phew!