This approach is quite difficult to replicate for most Wikimedia contributors (who are not coders and not used to playing around with such complex template/code constructs). But most importantly, it promotes and encourages 'custom' solutions for data modeling, which will eventually make querying and re-using data from Commons much more complex for both Wikimedians and for external re-users.
So, I don't want to promote this approach.
Instead, since the deployment of the Commons features I have been strongly advocating for the use of just a few standardized, simple Wikitext templates, preferably the minimal Wikitext templates that automatically pull all their data from the structured data, as the example under Commons:Structured data/Modeling - Wikimedia Commons
This will not only benefit ease of use for all Commons users of OpenRefine, but will also provide extremely helpful groundwork for other (future) batch contribution software.
If you notice that you need something in terms of data model / fields that the current default Commons templates don't support yet (Information, Artwork, Art photo, Book) then the most long-term and widely helpful thing to do today is to contribute to existing data modeling discussions and ask for your 'extra fields' to be added.
I have started various Phabricator tasks just for this purpose. I very much need help in this area (it's complex strategic work that will benefit from a group of people working together) and I would very much appreciate your contribution there. Examples of what you have been uploading would be extremely welcome so that the community can then translate them to simplified, Lua-driven standard solutions. The umbrella task is here: https://phabricator.wikimedia.org/T354016