I searched all over the Internet for a solution to disable the annoying dock notification badges for iTerm.
Turns out I don’t have to enter some weird commands in the terminal. Instead, it is actually a configurable setting.
The actual method is documented in an old post on OSXDaily from 2013, as a system setting inside Notifications:
You can get to this page by entering Notifications into the Spotlight.
Now I can finally get rid of the notifications (along with the sound effects as well).