Should we give preference to men's families or women's?

This is a question I believe has no definitive answer. Some solutions will do just fine but all of them are flawed to a degree.

First of all, in my country women don't change their last names after marriage. Their name is seen as part of their identity, and they don't become their husbands' sisters / daughters or anything when getting married; the wife's parents are still the wife's parents.

However, children will always have to inherit one of their parents' family names. Giving them random, combined or made up names doesn't seem functional or practical.

And, for those who care about continuity, switching between mom's and dad's last name every generation gives zig-zagging, confusing family trees instead of clear, straight lines of descent.

The problem is: if children inherit dad's name (most common tradition in the world right now) mom's role will never be as rewarded as it should be because, after all, the kids don't have her name and their descendants won't inherit it. Mom's identity basically disappears, she'll be forgotten in the future.

One proposal I read once was giving children their most successful parent's last name; whoever holds the higher status has preference. BUT that

A - is hard to define and classify. Which criteria should we follow? Wealth? Power? Social status? Those three aren't necessarily the same.

B - changes through time. What if one's parents switch positions in power? What if one rises in status or the other descends?

Not practical at all.

Thoughts?