> 2GB of persistent storage
2 GB is a lot when you store plain json document data.
> IndexedDb is the only option, it's slow on writes
Only when you need a new transaction per write. Writing many documents in a single tx is not slow [1]
> Safari are known to delete IndexedDB after 1 week
This is not really a problem because if you have not used the app for one week, you can just replicate the data from the server again.
> WebAssembly based sqlite is coming along nicely too
WebAssembly cannot access the IndexedDB API. In my tests, all the wrappers that use webassembly are slower on writes the just using IndexedDB via javascript.
The fastest you can go is by using a Memory-Synced wrapper around IndexedDB, like LokiJS does it or the RxDB memory plugin. [2]
[1] https://rxdb.info/slow-indexeddb.html
[2] https://rxdb.info/rx-storage-memory-synced.html