Cursory research turns up projects such as KoboWriter (https://github.com/olup/kobowriter/) which seem to have overcome some of the difficulties (though the process is still involved).
Has anyone done something like this? If so, how did it go? (And where can I read about it!)