Thanks Daeraxa and roman_r_m, both suggestions were useful!
Exported my stuff to JEX and the archive clocked up at 1.1GB, which is about the exact size of the stuff exported from mybase. Removed Joplin and C:\Users\USER\.config\joplin-desktop\*.* that includes database.sqlite; reinstalled fresh and imported the JEX archive back. The import finished with database.sqlite at about 1.8GB, which is quite an improvement, but it continued to grow afterwards and it's now at 2.8GB. Hope it stays there, I need no more indexing.
Daeraxa: note history = enabled seems indeed like the culprit why my db bulked up so much. I've disabled it for now. Thanks for the tip!