Hi,
I made this extension for TC 3.x, so I will try to update it. I haven't used TC 4.x yet, so I don't know what are the differences and why it does not work.
Fail2ban is just a simple python script so it should work... maybe 4.x has python 3.x by default and it's not 100% backwards compatible. Then we have a problem because as far as I know there is no newer release, witch is compatible with python 3.x.
I will check and see what I can do.