Optimization of Electronic Domain-Wall Properties by Aliovalent Cation Substitution