Debt can be viewed in many ways. I'm not saying that it's wrong to view debt as another form of financing - like you I studied Modigliani-Miller, just that there are other ways to view it.
My point is only that it's not right to disregard market cap entirely in preference to EV. EV is generally a "more comprehensive" measure of company value, but it doesn't supersede market cap.
EV, for example, is susceptible to distortion between leasing and buying capital assets. For example, a company with big capital assets financed via debt could note that the company would be more profitable if they sold them and leased them back. The company is now more profitable, and its reasonable to say its 'better', but its EV has gone down.