I don't have a definite answer on this. But I probably would leave the guessing to ListenBrainz for the following reasons:
- ListenBrainz always has a full MB database mirror available for matching. Thus it can make more efficient use of the data and potentially do better matching then using the MusicBrainz API
- Matching could also be done by the endpoints provided by ListenBrainz / Troi. But essentially those would do the same that is available in ListenBrainz as well
- Less code in Funkwhale to maintain
I'm not an expert on how ListenBrainz does the matching, though. But from my experience with Picard I know how difficult the matching in general can be, and that fetching all the required data for detailed metadata comparison via the MusicBrainz API can involve quite some API calls.
But maybe there is also some benefit of doing the matching beforehand. E.g. it would open the opportunity to allow users to see the matching and maybe even correct it in the futue. As I understand @petitminion already investigated the ListenBrainz / Troi endpoints in more detail and probably has better insights into this.