This argument isn't really theologically sound. If God exists, he's the one that created a biological system that allows for something as horrific as dementia. That literally has nothing to do with anything humans have done. It's pointless suffering.
> and to cause our contemporaries and descendants to suffer for our failures
Who's failures caused dementia? Certainly wasn't our ancestors fault.
Personally, I gain more comfort from the idea of an impartial universe, than a God who thinks this level of suffering is necessary.
But I do see what you're asking — how God seems to step in more often in the OT. Thinking of all of human history from ~4000BC until now where Mankind "grows up" over time, the concept of God as Father works — parents put a lot of restrictions on their kids when they're young to keep them safe, and remove those restrictions over time. Even if the child does something unsafe at a certain point a parent just has to say "now that you know the consequences, you have to live with them."
I don't think that this has any bearing on the existence of God, however. Humans are the ones who have created such an overwhelming and toxic physical environment and disconnected social one. For God to truly endow us with free will, He had to allow us to fail, even this miserably, and to cause our contemporaries and descendants to suffer for our failures. We have the hope of Christ's return and eternal life but only after everyone has been given the opportunity to turn to God for hope on earth.
I don't mean to prosthletize — this is how I understand the world and helps keep me hopeful in times of grief, and I hope it helps you too.