We would like to share our popular extension for Magento 2 that allows to disable compare products functionality.
No need to write custom layout updates or override the templates, this module removes product compare feature from every possible place.
You can check more details on our website.