Je suis d’accord avec cette explication, mais je pense que pour le mur de Berlin, il s’agissait d’un cas tangent."Mur" = any wall you may think of, including some barriers ("sound barrier" = "mur du son").
"Muraille" is never used for a house, even for a castle. It means something really huge and preferably very old and always made of stone, enclosing a stronghold, a town or a whole country. It is also sometimes used to describe a high cliff or a steep mountain slope.
Example : "La Grande Muraille de Chine".
On the other hand : "Le Mur de Berlin" (because the Berlin Wall was not that high, and was built in recent times)