If you spring for the full Max4Live Ableton package, you can automate quite a lot via the maxmsp JavaScript object, which gives you scripting access to the Live environment vis the LiveAPI object. It’s kind of an awkward API to use but still much nicer than using the traditional graphical max objects.
https://docs.cycling74.com/max5/vignettes/js/jsliveapi.html