"If even SQLite can have a RCE vulnerability, I'm convinced that it is not feasible for anybody to write safe C code."
This has much less to do with C, than it has to do with the fact that sqlite is a huge codebase.
Software can be vulnerable regardless of the programming languages used.