That is a controversial one, but my response also will be.
In that case, would it be better if someone were to gamble all their money and lose it all while they are still alive, rather than to pass it down to their children? Would someone die more peacefully knowing they gambled all their money away, rather than leaving it to their children, leaving their children's lives uncertain? Is passing down a home to stay for their children really such a bad thing, rather than forcing them to fend for themselves in a horribly inequitable world where people are often unable to afford housing?
Personally, I don't think making everyone have nothing or the equivalent of nothing is the solution to wealth inequality, I don't think that solves poverty.
Also, how much inheritance should be allowed? None? $250? $2,500? $25,000? $250,000? $2,500,000?
What about a rich relative leaving money to their disabled cousin who was on lifelong disability, is a significant lump sum inheritance of half a million dollars for said disabled cousin still bad? Does it become bad if said cousin instead weren't disabled in this example?
I'm not so sure it's as simple as all inheritance of money is bad.