This relates to the HtmlPageLinkRendererEnd hook and the places that we link to the fed props source wiki.
The JS module would already be written as part of T257910.
The JS should be loaded on all pages where the hook currently runs.
The same hook could be used, or some much higher hook such as BeforePageDisplay?
Ultimately the logic in HtmlPageLinkRendererEndHookHandler::shouldConvert is what decides when the hook would run and look for links to format for wikibase / fed props.
During the breakdown we discussed how to actually load modules like this, and https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/607539/5 is a rough and relevant example (although it uses addModuleStyles, rather than addModule)