The m-dash doesn’t really replace any other punctuation–they all have their proper and distinct place.
e.g
The difference between the m-dash in pairs and parentheses is that what’s inside parentheses add additional information that can be ignored altogether in the sentence, whereas m-dash pairs introduce an aside point that relates more closely to the sentence proper.
"Think of m-dashes in pairs as the opposite of parentheses. Where parentheses indicate that the reader should put less emphasis on the enclosed material, m-dashes indicate that the reader should pay more attention to the material between the dashes. "
Source: https://writingcenter.unc.edu/tips-and-tools/semi-colons-colons-and-dashes/]
Don’t be fooled, you just have to delve into the differences that, when you get down to it, aren’t that subtle.
I’m not a fan of advice that says when the writing is more informal to replace the semi-colon or parentheses, etc, with the m-dash, because it seems to be an excuse to not look into the details and be precise with your punctuation.
They paint their houses those bright colours because of the long, brutally cold, depressing, grey, sun-starved winters. But great place to visit in the summer months.