I’m not sure about that. For actual cross posts, where the server is aware of the posts that are connected, it’d just be a matter of fetching all the sets of comments rather than just the one.
For when no one has actually cross posted but just posted the same link to a different community, that gets slightly trickier.
Any sort of solution though would require some service, whether on the instances or a separate bot, to scan for identical URLs and make connections for the frontend or client to then use. In such a case, the backend would need some idea or structure for a post hoc cross post, which would identify separate posts as being related in a way separate but similar to the cross-posted information.