We have three Wikimedia* extensions that are for adapting other extensions' behavior to Wikimedia policies/expectations/brand/whatever: WikimediaMessages (i18n), WikimediaEvents (analytics), WikimediaMaintenance (CLI commands). It's a constant struggle to find a place for things which don't fall into those three buckets. They tend to end up in mediawiki-config (horrible for testing, messes up deploy cadence), in WikimediaEvents despite not being related to events / analytics at all (e.g. EmailAuth hooks - no huge drawback but it's unintuitive) or some vaguely related normal extension (e.g. CentralAuth - annoying for third parties, makes setting up a local environment to test the customization really hard).
We should create a fourth extension (WikimediaHooks? a bit awkward given that some hooks legitimately belong to WikimediaMessages or WikimediaEvents), and move all the complex code from mediawiki-config etc. there.