Cannot undo 30k tasks

I have a large database of 23k entries that I was working on. After an hour of work (~25k actions later), I realized a mistake and wanted to go back to the state 1h ago. I was at 44k tasks then and am at 70k tasks now. I let the computer load for 2 hours (16GB RAM) undisturbed with no other background programs running and it managed to get 10k actions undone. But from there I can’t go further. What can I do??