A look at the CVE list reveals that there were some CVEs with read freed memory or array overflows. That said the amount of CVEs is comparatively tiny to other software, so as you said, it really shows that they put incredible amounts of efforts into safety and correctness. Still, there would probably still be some value to it, even if very minimal (is it worth it though?)
The solution to sqlite memory safety isn't porting it to Rust. It's for someone to spend a hundred dollars a year auditing the C code for vulnerabilities with each new frontier model as they're made available.
Personally I hope so. If software vulnerabilities become a disease that we cure, that is a good thing for everyone. (For me the LLM coding revolution hasn't really changed what I do, or how much I do. What's changed is the expectation of code quality and resilience has gone up a non-hyperbolical 10x.)
And just look what's been happening.