AWB genfixes seem to ignore square brackets that are wrapped in <nowiki> tags (e.g. <nowiki>[</nowiki>) for the purposes of finding mismatched square brackets, and so they remove the closing bracket if it's not also wrapped in <nowiki> tags; for example, see this edit. There are currently about 2,839 articles with <nowiki>[</nowiki> on enwp, and 4,149 articles with <nowiki>]</nowiki>, so more than a thousand articles with mismatched <nowiki> square brackets that genfixes could break.
Ideally, would it be possible to check for these, and replace any <nowiki> brackets with {{Bracket}}, before checking for mismatched brackets, which would also improve code clarity? Failing that, I think it should be possible to ignore whether or not brackets are wrapped in <nowiki> for the purposes of checking whether or not there are mismatched brackets: I can't think of any case where a bracket in <nowiki> would affect whether brackets are mismatched or not, either in markup terms, or for readers – i.e. a bracket is a bracket, whether or not it's <nowiki>d. Only if it's found that there are unmatched brackets, then you might need to distinguish them, to work out which brackets to add/remove (which is another good reason to replace them with {{Bracket}} first, to avoid this complication).
For more info, see Wikipedia talk:AutoWikiBrowser/General fixes#Square bracket mismatch on enwp.