How do you define "benefit"?
Your dad swindled thousands of "investors" out of their retirements and left you millions. You are benefiting from this and the children of the "investors" are suffering.
Your great-grand-dad swindled thousands of "investors" out of their retirements and you inherit a business empire. You are benefiting from this and the hundreds of great-grand-children of the "investors" are also suffering. They could've had inheritances but they didn't and work at Walmart.
You can trace your lineage to Thomas Jefferson who apparently owned 600 slaves over his lifetime. You still benefit from him having been a president and a wealthy man. You should have to trace ancestry of those slaves and compensate their current living family members.
But if your wealth comes from a line of crime, then yes, compensation would be adequate.
Practically, that's difficult. If you grew up wealthy because of generational crime that provides life advantages you can't return. At best, you could make sure you direct any inheritance to victims if possible or a suitable charity (and not your family foundation).
Legally, this is not plausible. All sorts of legal principles dictate that lawsuits must be timely (for various values of timely) and estates become unlitigatable not very long after they're closed. There are some cases in the news about crimes in WWII and such, though.
But the law knows such things in principle, even though usually not individually, but rather collectivly.
Like the native americans get some sort of privilege today. And (some) black americans demand reparations for past slavery.
But where to draw the line indeed. I don't think there is a universal answer.