I had the same problem, and I managed to solve this with an external tool. I downloaded "DB Browser for SQLite" (sqlitebrowser.org), opened the "Ditto.db" file, and ran "Tools > Compact Database" (of course don't do this while ditto is running). It reduced the size of the DB from 2.5GB to 5MB! Ditto runs with no issues afterwards and no clips were lost.