Over the course of a year or so I wrote a command composer manage-dblist init which sets up the initial configuration for a new wiki. And after https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1057037, this should be fully ready to be used to automatically generate a patch when a task requesting a new wiki is being created.
It does not fully work for chapter wikis or private wikis or something else special. But it should fully work for "normal" language projects.