How to make an armour stand's name invisible through walls?

Solution 1:

You can't.

Seems like you have already tried everything that I would try. There's no other way, names are always visible through walls.

The best other option might be to have a renamed item in an item frame. That will only be visible when looking at the item frame, which requires an unobstructed line of sight.