https://ntfy.sh/ is also worth mentioning in this space.
As a result, I'm obviously very reluctant to believe the praise about them as I found this incredibly rude. There ought to be a better way to do this. I realize that this is only tangentially related to their technology, but still.
I'm sure there's an optimal sequence of keypresses that tests all 10000 codes in something like 30,000 keypresses rather than the naive 40,000.
https://en.wikipedia.org/wiki/De_Bruijn_sequence
It seems that you can do it in 10003 key presses. Calculation for this this exact example is in the Wikipedia page.