Ideally someone would implement replication as a separate process, like litestream but with better guarantees like rqlite/dqlite, but until that happens, I don't think they're of much use in a SaaS, unless it's to be an in process database alternative to Postgres and the likes, where users only access is through something like a rest api.
5 or more servers, each running unikernels in tiny virtual machines, with a JavaScript interpreter or similar to run untrusted user code. Each unikernel is then booted on every request, perhaps with a cool down period before being shut down. This would work similar to GCP, Azure etc. and performance would be great because of how fast unikernels boot.
The unikernels would also be compiled with SQLite, with each database per customer stored on the host, and with restrictions on the virtual machine to only allow access to the database associated with the caller.
Whenever untrusted code is executed, it can insert/update/read/delete from the database on the host. If the host then handled replication, that means I can just shut down the vm when the code has been run, and start a clean one for the next customer. A guarantee that the data have been safely replicated would be essential here, since another server might handle the next request, with the expectation that the data is in a new state.