There is one related post here
but unfortunately even if you enable audit
for more detailed logs .. you wont have the remote IP there so its not possible to use fail2ban using node-red logs.
You could use a reverse proxy like caddy server or nginx in front of your NR server
and use their more detailed logs to implement the additional fail2ban security (protecting you from brute force attacks) along with node-red's authentication using a strong password.