How to actually handle the xPub gap limit when receiving Bitcoin deposits? I've read the other questions involving this, including How to solve Blockchain 20 address gap-limit problem? and Blockchain gap limit which don't actually remedy the issue in a practical sense, only further explain why it exists.
I understand why the gap exists, how it works, and how Blockchain.info handles it. (Both with callbacks, checkgap API requests, returning an error when the gap reaches over 20, etc)
My question is, what can I, as a developer, do to prevent exhausting this gap? Is this even a valid method for handling a larger website's Bitcoin deposits from users? Do I just have to hope that 20 users don't generate an address for fun, sending operations into a standstill?
Any website that is handling user funds should be running a node to ensure they have an accurate view of the network. Depending on an API introduces trust of a third party into the situation, which is an unnecessary risk.
As a developer, you can then simply customize the gap limit to suit your business’ needs. In many cases this likely just means increasing the gap limit to a larger number.