Is there a way to create a Webform automatically via script using Drush or another method?
You can exactly do what you touched on with config: put a placeholder into the yaml for the URL and remove the uuid completely. As you import into a new site, that will generate a new one for you.