It’s also a practical policy. It’s far easier to know the stepped-up basis on the date of X’s death than it is to know the basis that X had in something once X is dead.

Which argues in favor of the inheritance tax mentioned.

There could be other solutions too -- say, require a virtual wash trade at time of inheritance, so the capital gains from the parent's lifetime are taxed at time of death and the child gets the stepped up basis. Somewhat different than an inheritance tax, but at least not a giveaway.