so... let me clarify what the state/function of the discussed script versions do...
I would not say unpredictable... i'd say 'difficult for the average user to debug'...
the script implementation relies on the NEW destination interface name to be FREE... 'swapping' aka tearing down and re-assigning an occupied interface name during asynchronous hotplug is challenging... OP was advised to use uniq new interface names and provide config/output which did not manifest...
lower level solution(or at least partial logic) is the way forward... said implementation is targeted at USB only devices... and having 'lan' predictable helps alot... but in the case of something like virtualbox or similar where we may wish to assign a physical nic to an interface name the said implementation would likely require alteration re-assessment
spent 50-100 or more hours on this (3 attempts from scratch)... so pretty mentally burn't out on efforts... (but have tested and had functional versions on several occasions)
code from @bobafetthotmail@vgaetera and one or two more who I don't have the names in front of me was very helpful / used during these attempts...
thinking about this topic afresh... should a new attempt / mods to be made... i'd consider naming usb nics> intPHYMAC... but this carries some reverse uci walk implications and likely interferes with firstboot/setup logic... (and name size limitations?)...
this is interesting... had not considered this... worth adding tho' that matching mac can change depending on if an override is present and at what stage of the initialization process the move is made...