The issue is reproducible on your trial servers as well.
I used reproducer.zammad.com you should be able to extract the needed info from the server logs there.
Or any setup actually.
The error 500 goes away on the testsetup much faster than on the production server as there are no agents active and nothing is going on on the server so the jobs get cleared much faster I guess. But the error still appears.