Every major software project should appoint a UX Czar who has the authority to kill a feature if they have reason to believe it will royally piss off any more than a mere fraction of the userbase of the product.
New features should always benefit *a reasonable subset* of the total users of the product.
Either that, or release the possibly-hated feature as a totally optional add-on and make it clear that it's optional.
This feels like it shouldn't be rocket science… 🙃