Bookstack has a pretty robust API for things like adding/exporting content even if the UI doesn’t always have a way to do things.
Might be worth looking at this ready-made script and see if it serves your purpose (at the very least just to make your shift from BS a bit easier): https://gist.github.com/ssddanbrown/45acb913a7b873240b2d89781e74a7a4
Right?! Super easy to be “privacy focused” when you just flat out refuse to acknowledge anything as personally identifiable information!