The cleanupEmptyCategories.php maintenance script is not meant to be a script to be run once in the entire lifetime of the wiki. However, its class extends LoggedUpdateMaintenance, causing it to do nothing when the script has been run once, which makes no sense.
Without using the --force parameter the output of the script is
...Update 'cleanup empty categories' already logged as completed.
in contrast to e.g.
Adding empty categories with description pages... Removing empty categories without description pages... --mode=remove --begin=Weinstube_im_Landkreis Category cleanup complete.
- MediaWiki 1.31.4 (171d96b) 30. Sep. 2019, 19:35
- PHP 7.2.13-1+0~20181207100540.13+stretch~1.gbpf57305 (apache2handler)
- MariaDB 10.1.37-MariaDB-0+deb9u1
The script was added in https://github.com/wikimedia/mediawiki/commit/47e2ef34b0c3dbecfc80b84acad9d2bb0baac1e2 which first landed in 1.28.
I assume this would impact upgrades from 1.27 which we are still meant to support.
This technically won't break anything but could end up with some incorrect category entries that wouldn't sync up correctly if you're still on 1.27 and haven't upgraded yet.
Fixing this might be an annoyance for them people so if we want to keep things right then we'd probably have to wait until 1.39
Repeat my comment from the patch set, where I suggest not doing this.
The maintenance script is running as part of update.php and therefor should be a LoggedUpdateMaintenance. There is no need to run it on every update.php even for large wikis. If running from a job that should specify the force parameter.