No if someone raped a bunch of children, we shouldn't be 'eternally grateful' because he eventually gave them ice cream and candy. Your theodicy doesn't work. Please find a better one.
That person would go to hell, or not even exist anymore, and the other ones would spend eternity in heaven with God, and, there are "other factors" as well, in part, that God makes the suffering that only some few have have to suffer or go through for the ultimate good and the saving of many, much if not all of the time also.
The depths of the mysteries involved in how he does this "exactly" and specifically, especially in such cases like you mention, are beyond my comprehension or knowing down to the smallest details specifically, but I know he does, almost all, if not all of every single time in every single case, etc.
And there are "rewards" for suffering also, or higher positions offered or given to those who have suffered more, in heaven, or in the afterlife, and it was, or would, or will be "in line or in perfect accord with their own hearts desire", they just didn't know they would have to suffer so much to get it, but in heaven, they will not regret it, no not ever, once they are there, etc... The sufferings made them able and fully capable and fully equipped for the, or those positions also...
Even Christ Himself learned, or what made him qualified for even His position, was the things He suffered, same also with many others who talked about the sufferings, like Paul, and others crucified and tortured for their faith, etc... Put in prison, beaten, tortured, tormented, and humiliated, persecuted to an excessive degree, etc...
It is their sufferings that gets them the highest positions in heaven, and qualifies them for them, that they wanted to begin with, just didn't know or check the "price tag" I guess you could say, but no one will ever regret that there anymore, and in fact, it will all even be forgotten at or by that time...
Like I said, God makes all right and just in the end, and no one will regret it (anymore) either, not at all...
If some few can suffer for the good of very, very many, rather than all suffer for no reason, or no good reason at all, then don't you think that would be right or just, especially if it was the only way for God to give us what we want...? Or what both us and Him wants, etc...? Some "few" also suffer more so that others or the many will not have to suffer as much or a lot "less", also, etc...
Trust me it was the "only way"...
God Bless!