I had a question very similar to this. Let's say I wanted to create an addon that would create 4 different frames. The 4 frames would be identical in all aspects except for size and the text displayed in the frame.
What you are saying is I could create one version of this in my .xml file and name it something like "myTemplate". And in this template I could have something like this:
Then in my .lua file I could use the CreateFrame method to create 4 different versions of this one frame and then change the text contents of each frame using the name assigned to it during creation, like this:
local f = CreateFrame('Frame', 'frame1', 'UIParent', 'myTemplate')
To elaborate on this, all frames, textures and fontstrings do not GC because they are referenced by both Lua side and C side of code internally.
If you plan to use a lot of frames, a dynamic number, then you will need to add code to "recycle frames", where you store references to "unused frames" in a table (and make sure you nil out all other existing references to it), and whenever you need a new frame, you look in the "unused frames" table and set all its new values such as width/height, etc. If the "unused frames" table is empty, then you create a new one.