You can use a tool called Calibre to strip DRM from your ebooks.
Also let's your side load them onto a different branded device so you're not locked in.
Eg. I moved from kindle to kobo and was able to bring my content with me
True but it’s not ideal. You lose the typographic improvements that you get in the newer format. Still, it’s better than nothing and I’ve read that some people have purchased a used, older Kindle just to get access to the older file format.
Eg. I moved from kindle to kobo and was able to bring my content with me