Currently, there is no way to catch each connection attempt failure.
CONNECTFAIL only triggers after mIRC's max number of attempts is exhausted.
I suggest adding a on CONNECTATTEMPTFAIL event
on *:CONNECTATTEMPTFAIL:{
;; $1- contains the error message if one can be deduced
}