Suggested by @Anomie in T217239#4994301: a module like meta=languageinfo which gives you access to information (e. g. name in user language, autonym, fallbacks) for arbitrary languages MediaWiki knows about. Because this information is expensive to retrieve when the localization cache is not used, the module would apply continuation after the request reaches a certain time limit (e. g. two seconds), but in production we wouldn’t expect this to be necessary.
I think this would be a good task for the Wikimedia Hackathon 2019.