Creating a touchbar button using AppleScript

Hi there. I have a list containing hundreds of plugins, a folder with the plugins corresponding ui scripted AppleScripts to call the plug-in in an apps gui which I created on a loop using osacompile and a folder of corresponding icons for each plug-in.

Would anyone be able to provide an example (if it’s possible) of an AppleScript that will create a Touch Bar button, attach a description from a variable, assign an AppleScript blocking action, attach a saved .scpt script to the action, add an .icns/png/tiff file as an icon and check the show icon instead of description option? If possible would be great if I could also set the icon size and specify or create a group which the Touch Bar button will reside. I’d like a routine that doesn’t use ui scripting that does something like:

set the_parent to group “plugins”  of application “Logic Pro”
    If group “Arturia” of the_parent exists then
        Set theGrp to group “Arturia” of the_parent
        
Else 
      add_new_group “Arturia” to the_parent 

        Set theGrp to group “Arturia” of the_parent

End if

add_new_trigger to theGrp  “{
\"BTTTouchBarButtonName\" : \"Piano”

Etc