Isn’t publishing on Github Pages still posting to a corporate centrally owned entity and not a solution to the problem described?

But it is portable. It is essentially markdown files. You can download your repo, compile the Jekyll to static pages and publish them anywhere.

When you publish to Facebook, WordPress etc you can't easily get your stuff out. You will have to process them even if they allow you to download your content as a zip folder. The images will be broken. Links between pages won't work etc.

Facebook provides a data export service which gives you a zip file with a web version of all your content. I’m not sure what the difference is then between that and a Github hosted repository of all your content as a webpage.

The main difference is the data structure and the intent of the export. Facebook's tool is built for data compliance and local offline viewing, not web portability. If you open that Facebook zip file, the HTML version is just a massive dump of proprietary markup. To actually migrate those posts to a new blog, you'd have to write a custom scraper just to extract your own text from their messy div tags. If you use their JSON export, you still have to write a custom script to parse their specific schema and remap all the hardcoded local image paths so they work on a live server. With a Github Pages repo, your content is already sitting there as raw, standardized Markdown. You can just take that folder of .md files, drop it into Hugo, 11ty, or any other static site generator, and it just works. No scraping or data-wrangling required.