The next step after T371267: Create a script to backfill missing local accounts on loginwiki/metawiki for new global accounts is to do a test run in production (e.g. autocreate the missing accounts for the last month on loginwiki), and if all went well, create a cronjob for running the script regularly.
One thing that probably needs to be fixed is that I think the script now requires an absolute start date, while for the cronjob it would be better to accept things like one month ago. (It could be solved in other ways, by complicating the cron command, but it's much harder to test / debug things there so probably easier to handle it on the MediaWiki side.)