Why my macOS Messages badge lied to me (and the one-line fix)

I will be the first to admit that I'm sometimes bad at responding to texts — but I'm not 112-unread-messages bad, as the notification badge on my Mac makes me out to be. It sits there mocking me, over a hundred messages that despite my best efforts I can never clear. No matter how many times I right-click to try and find them they remain tucked away somewhere, inactionable and yet unread,…