Paul, I think Jonathan LaCour documented some of how he exported his Facebook and Instagram data and imported it to his own website. While he is using Known (also a PHP based CMS), a lot of the code and method could probably be reused for WordPress.

I haven’t been watching Keyring for a while, but keep in mind that Facebook has apparently dramatically increased the amount of data they allow for export post-GDPR in the last year. You might also appreciate the Data Transfer Project which has been doing some interesting work since last July.