When I was researching this issue for my solution, I reviewed this blog for ideas:
https://www.codingmerc.com/blog/ios-vpn-on-demand-profile-with-openvpn/
I also came across this tool:
https://github.com/iphoting/ovpnmcgen.rb
But I decided to use Configurator to build the scaffolding instead of that tool, so I have no experience with it.
I do think if you are going to do any serious work with mobileconfig format you need to get a Mac to build the templates using Configurator. Apple uses non-standard XML to for its plist format, so you can't use a standards-based parser to generate the XML. Either you will have to find or write a cross-platform parser, or hand-code the files using an editor. Apple also requires GUIDs to identify the various payload sections of the mobileconfg. Configurator will generate these GUIDs for you.
Unfortunately, the current Configurator version does not support GUI for the InterfaceTypeMatch and SSIDMatch dictionaries for triggering VPN activation based on interface or AP change, so you will still have to generate these sections after creating the mobileconfig template using Configurator.