OP here. Persisting SQLite data in a browser is quite a complex topic in a rapidly-evolving space, with info spread out over official SQLite documentation, forum posts, GitHub issues and discussions. I spent many hours researching the various options and considerations, and I'm hoping this write-up will be useful to others.