I hadn’t. Seems a little too complicated for its own good, but if it works for you, have at it.
If you’re willing to install things, envsubt can replace bash interpolation. Then you just need a tiny script to load env vars from a file and export them. Need a hash function? Another tiny script. Then you’ve at least followed The Unix Philosophy.
The nice thing about my bash template file pattern tho is that you can embed arbitrary subshell interpolation if you need to call out to another script or function. Infinite composability. Minimal cognitive overhead.