https://estk.aenhancers.com/index.html (Contains ScriptUI documentation)
Peter Kahrel's ScriptUI documentation (recommended)
Two ways to browse the object structure to see what exists:
Use the generated web pages at http://jongware.mit.edu/, eg.
For a script to be dockable, you must install the scripts into the ScriptUI folder, and you must invoke it from the Window menu. Then it will open as a panel, and you can drag and drop it into the UI as you would any other panel.
FXPHD AFX210 Introduction to After Effects Scripting — highly recommended for beginners
FXPHD AFX226: Scripting in After Effects, MATHIAS MÖHL
The Coding Train by Daniel Shiffman
I usually recommend people to watch FXPhd training on Introduction to After Effects Scripting. From there on, you should be confident enough to pave your own path; yes it is that magical.
Automation is a concept; there is no standard technique. You need to have the foundations of coding and scripting to create your automation workflow.