I removed fail2ban and switched completely to CrowdSec.
CrowdSec will recognize attacks on your system, and can block them by service or also to block the IP for the entire server. That depends how you configure the system. And you could also integrate the community lists, so attackers who are already recognized on other CrowdSec systems will be shared with your system. Hence the name crowdsecurity, you get the lists also from the crowd.
I haven't compared which one is better, but CrowdSec is a new and modern way for blocking attackers. For example for the log4j vulnerability it took only some hours and a new log4j block scenario was released.
Here also some more informations.