I think you've got a misunderstanding of the concept of "Total Depravity" and of the definition of the word "good" from a Christian perspective.
Total Depravity does not mean that we are totally evil. It doesn't mean that we have no good within us whatsoever. Everybody on earth has some good in them, so it would be utter foolishness to interpret the doctrine in such a way.
On the other hand, "good" in our understanding is a relative term. We can do good things, we can think good thoughts. Someone who is generally caring, loving, and giving is considered a good person. But such a person is not perfect. Everyone has a flaw.
In the context of Christianity and salvation, "good" is a black and white issue. "Good" would mean 100% in line with God's thinking - in thought and in action. In other words, it would be completely without sin. Even one sin in our life disqualifies us from the level of "goodness" needed to earn our way into heaven.
For whoever shall keep the whole Law, and yet stumble in one point, he
is guilty of all.” (James 2:10)
Which brings us back to total depravity.
It doesn't mean "devoid of any good thing". It means "Separated from God, and completely unable to do anything, whatsoever, that could do anything to assist in our own salvation."
In non-technical, layman's terms, it means that salvation is completely, 100% the work of God, with no action, not even one of surrender on the part of the believer. Totally depraved simply means completely separated from God, with no power whatsoever to do anything in the least to be saved.
This is contrasted with the belief of partial depravity, which goes hand-in-hand with resistible grace espoused in Arminian theology, which says we do have the power to do one thing - accept the free gift of salvation offered to us. In Arminianism, we believe there is an act of accepting the gift on the part of the believer. The believer has the power to choose. Grace is resistible.
In Calvinism, that power doesn't exist, or is an illusion because even if the believer thinks he is choosing to put his faith in Christ, the fact is that God predestined that believer to do so. The believer has no choice. Grace is irresistible, because God has ordained that person to believe.
Either way, however, both "Total depravity" and "Partial depravity" see no issue with the Rich man's ability to do good things. Again, everyone is capable of doing "good" just not the type of "good" that leads to salvation.