Alternatively, you can use something which saves in a format that would be trivial to make a replacement for reading/writing it.
One example is jrnl[1]. Each journal (collection of entries) is written in a flat text file. You can optionally encrypt it with AES. They even give you reference code on how you could decrypt it yourself[2].
If jrnl stops being a thing, I can probably re-implement all of its functionality in a day. Or someone else can. Its output is very simple.