But wait.
The lockers had to open before the riddle could be solved. As soon as Thaddeus does his thing, everybody sees all the words.
How likely is it all 99 of the Nasties are too dim to solve the riddle? I’ll bet at least one can - it’s not that hard. If only Cutiepie can solve it, she gets all the jewels, and yes, she’s still going to be pestered forever unto the seventh generation. But if Thaddeus solves it too, he can tell the solution to the other 98.
Then everybody shares equally, and there is no pestering. So that’s the real solution.
EDIT: In fact, that’s the solution regardless of what the riddle says. So Thaddeus can solve it before he opens any lockers.