Hi Giora,
Thanks for taking the time to submit this idea.

To play devil's advocate for a minute; would this kind of block be more effectively applied at the server firewall/WAF level, rather than at the application level?
The benefit that I see using a firewall is that the problematic IP/ASN is blocked from your site entirely so doesn't waste any resources at-all. Application-level blocking would still consume PHP processes.