"Hunk #5 FAILED at 2001." when upgrading wine through homebrew
I was able to solve it by deleting these lines:

# Patch to fix screen-flickering issues. Still relevant on 3.0.
# https://bugs.winehq.org/show_bug.cgi?id=34166
patch do
  url "https://raw.githubusercontent.com/Homebrew/formula-patches/74c2566/wine/2.14.patch"
  sha256 "6907471d18996ada60cc0cbc8462a1698e90720c0882846dfbfb163e5d3899b8"
end


in /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/wine.rb. Take note that, as the comment states, "screen-flickering issues" may be present when this patch is not applied.