I think it depends. Your average person, you wish the best for them -- whether a last minute (known only to God) conversion, and at least squeaking into Purgatory.
For most individuals, those who you wouldn't be *happy* to see gone, I would say this applies. You know, those for whom it *wouldn't* be scandalous to have a public Mass said for them. This applies to almost everyone.
But for a notorious sinner or villain, those who have sold their souls to the devil, individuals like "Notorious R.B.G", вιℓℓ gαтeѕ, Klaus Schwab, etc. -- I don't think I'd be saying that. Unless I had some sign he had converted. I just leave such individuals to God. Basically, it's a case of "May God's will be done unto them -- whatever that might be."
Meanwhile, I would focus on the benefits for the world and for the Mystical Body of Christ due exclusively to their passing. Focusing on these *goods*, rather than the person burning in Hell, is not against charity at all.