Write the posts on a self-hosted site, then syndicate them to Medium and share those links on social media.
Another option is to use a custom domain with Medium[0]. That way, if Medium goes out of business, you could just set up a self-hosted replacement blog with redirects for the URLs for the posts you made on Medium.