The very high volume products in most companies goes a long way toward paying the bills and making sure everyone keeps a job even during lean times when higher end products may not sell quite as well. They may not generate enormous profits in and of themselves but they are important for this as well as other things (gateway products, innovation test beds, useful life extension for out-dated tech, etc.).
Personally the M series didn't do much for me until the M6 II, and I tried them twice before (M, and M3). They may very well be winding it down as some rumors indicate but at least in my opinion that doesn't really seem to be the trajectory they were taking. The M6II was quite a leap in M series tech by all accounts, and many including myself would love to see that same tech in an M5 (I have the EVF attached permanently as is). If they are, I can't imagine the role of the bread and butter high volume seller wouldn't be replaced by something else, and that something else would need to fulfill the same market demands that make the current series so popular with the general public. I THINK that is the size/performance/cost relationship but perhaps there is something to it I do not understand.
Canon made a significant stride with the R5 release, as well as the RF series in general. In fact all of the MILC/DR...blah blah arguments have died away entirely based on my personal observation. I would speculate that a lot of that technology will trickle down to lesser models in the R line, but potentially into whatever the M line is to become as well. Technology changes fast, but companies need an outlet to get useful life out of existing tech that cost millions to develop. I don't think the potential outlet the M series provides is going away entirely. Change? Almost certainly.
Caveat: The one fly in the ointment is the lack of development in the series of lenses which puzzle me. A case could be made that it is to incentivize transfer to higher end products but it still strikes me as being a little off.