Just out of curiosity, then how does wallets like blockchain.com manage millions of wallet? They may be receiving walletnotify callback every second.
They don't use Bitcoin Core. They use their own custom software to receive blocks and transactions and notify other systems.