For Medium I use a custom domain so I still own the URL. And all links to my content are to a URL I own. When I inevitably move to a new service those links will continue to be valid.
I'd like to move off Medium to something pure custom. The inability to embed certain types of rich content is super, super frusrating. Want to embed a gif that doesn't suck? Or a Unity demo? Or an javascript demo? Too bad! You can't!
But it gives me 95% of what I want for free so I won't complain too much.
Technically you make a publication and THAT gets a custom domain. Which is a little weird but overall works. The publication portal looks a million times better and has way more configuration options than a basic user profile.
Here's mine and what it looks like: https://blog.forrestthewoods.com/
If you want to do this long-term, get your own domain and distribute your content elsewhere if needed. E.g. on medium you can post articles from your blog and it links back at the bottom if you think Medium is important for your audience, announce posts on Twitter, Facebook, have RSS feeds, ...: bring the information where the users are, but have the central source of it under your control. Pointing the domain at a service is fine, it enables you to move if there are issues.