There might be other temporary solutions similar to this suggestion as well.
Customize query in gerrit
|pywikibot/core||master||+11 -1||[bugfix] Increase maxlag parameter after each wait cycle|
I am not sure if this is a good option. On any other wiki maxlag means to stop bot actions (or at least the write ones) and we should obey this threshold there. Only WD is failing due to WDQS issues so it would be reasonable to fix only WD.