Calibre does the trick.

It's a shame there's no good hardware ereader to use it with. Every e-ink device is closed hardware, runs only closed software, and is trying to lock you into some DRM-rich ecosystem.

Actually there are ways to install software on many ereaders. About 10 years ago I used PRS+ on Sony's PRS-500. Nowadays Sony's ereaders are pretty much dead, but there is alternative software for Kindle, Kobo and others. By quick googling I just found:

https://github.com/koreader/koreader

https://github.com/ccoffing/OcherBook

https://github.com/lgeek/okreader

https://fread.ink/

Also:

https://onyxboox.com/ - this is Android so I guess it's bit more hackable

https://the-digital-reader.com/2015/06/19/is-the-booq-cervan...