When the malformed database error occurs, the only fix seems to be restoring the kobo database from the instructions at
https://www.mobileread.com/forums/showthread.php?t=94789
It seems to have corrected everyone's issue. Have you been disconnecting properly and not just unplugging? I have two devices that I use extensively for development (which means far more messing with the database than the average user) and I have yet to see that issue.
Tim