By templates, I assume you mean Tpl Chunks. Templates are elements and you’d have to do more coding to store them in files at this point.
I think you might be better off creating a context setting called base_path and using this:
$pathToFile = $modx->getOption('base_path') . $modx->getOption('templates_path') . $modx->getOption('path',$scriptProperties);
You wouldn’t need getConfig() and you wouldn’t need the base path in your templates_path string.
Context settings will override any system settings so MODx would get the proper base_path for each context.
I assume you know that standard snippets like Wayfinder and getResources won’t use your files because they expect the name of the Tpl Chunk rather than its path.
I’m not recommending this, but In theory, you could rewrite $modx->getChunk() to get your Tpl Chunk files if they exist instead of pulling them from the DB. Then all snippets would get your files and process them normally and you could just use getChunk() in your own snippets. The changes could be overwritten when you upgrade, though.