Collapsing domain walls in the two-Higgs-doublet model and deep insights from the EDM