Is there a good tool to fuzzily merge and de-dup multiple inboxes? Because otherwise I'm going to have to write it myself.

I currently have a gmail inbox and hey inbox with partial duplicates in each. I'd like to merge and de-dup my history as a one-time event and migrate to fastmail.

The gmail inbox has longer history. The gmail forwards to hey so hey has responses that don't exist in gmail.

I've already started with mbox exports and SQLite import, but I'd rather use something pre-existing. Any pointers?

Put everything into a single notmuchmail database. It wil deduplicate the emails and even provide a fast local search interface for all of your mails https://notmuchmail.org/

For gmail you can use lieer to pull everything https://github.com/gauteh/lieer (tho it can take hours to pull everything). Fastmail has a similar tool https://github.com/elizagamedev/mujmap

If you unpack tour mbox into maildir then you can import that too into notmuch

After everything is in notmuch you can easily push your mail to fastmail with isync/mbsync https://isync.sourceforge.io/

As a bonus point you now also have a easily updatable local backup of your e-mails.