Parsoid has its own extension API - see https://www.mediawiki.org/wiki/Parsoid/Extension_API.
The RelatedArticles extension needs an update to work directly with Parsoid so that we can switch Wikimedia wikis to use Parsoid instead of core parser in late 2021.
The Parsing Team will work with you as required.
Looking at the code, it appears that it uses the setFunctionHook API. ParsoidExtensionAPI is yet to add this support. But, looking at the extension code, once that is done, the actual retargeting work should be quite straightforward and simple.