I've recently moved from fail2ban to crowdsec. It's nice and modular and seems to fit your use case: set up a http 404/rate-limit filter and a cloudflare bouncer to ban the IP address at the cloudflare level (instead of IPtables). Though I'm not sure if the cloudflare tunnel would complicate things.
Another good thing about it is it has a crowd sourced IP reputation list. Too many blocks from other users = preemptive ban.
As someone who works with 100Gbps networking: