The "Show table of contents (for pages with more than 3 headings)" user preference should be removed from MediaWiki core.
The table of contents box is auto-inserted, can trivially be hidden or exposed on a per-page basis with MAGICWORDS, includes a sticky [show|hide] link, and can be easily hidden with site-wide CSS as necessary.
The associated user preference simply isn't worth the additional code complexity and user interface clutter.
This should be an easy bug to resolve; marking it with the Bugzilla keyword accordingly.
Version: 1.23.0
Severity: enhancement