Is there a way to override the template caching system?
"Due to the amount of queries to this backend we will probably run out of its auto incremental key space."


That would seem to suggest that maybe your template caching strategy should be re-visited?

Are there really going to be 215 million (from a signed int) unique pieces of cached content that need to be saved?


  Now my question is can I override the twig cache subsystem?


Right now, there aren't any hooks or events into the template caching layer, but a few people have asked for it to hook up to external services like memcached, redis, varnish, fastly, etc.  So it's on our list to add some events for plugins to get notified when things like cache expiration occurs for a piece of content.