I bought a GM5 new that I owned for years - funny thing is, they were hard to get in the USA. Mine was imported from Hong Kong if I remember right. I think sales volume was not the true reason these models were discontinued; camera manufacturers should subsidize models which might sell fewer units but have a higher brand recognition and panache by the sale of more popular/less specialized models. I'm sure Panasonic could have kept a GM line alive by sales, for example, of the G line (G6, G7, G85, G95). Certainly the latter were/are much more widely available, but no one uses a G7 to showcase what the Lumix line can be.
This is, however, a lesson that I think camera manufacturers needed to learn. While I haven't seen it mentioned often, I think Panasonic was one of the ones who saw a steady drop in sales when the A7 series got popular and a lot of mirrorless users started chasing FF (whether they needed it or not). We probably saw some years of reactionary, back-foot thinking from them (still do, maybe).