You were fighting him horizontally, which is what he wants. I think you'd be well off to try and get him off the ledge more. Even if you don't convert ledge stuff to gimps, its a great time to rack up damage. Ftilt ftilt nair to knock mac back offstage is a really nice pressure string at the ledge, and you don't have to commit to the nair unless your ftilts are hitting. Otherwise, backing up to safety is improved since you are moving towards the centre of the stage, instead of towards the edges. This would prevent things like ftilt killing you annoyingly early.
Don't land next to him. You were good about it for the most part, but he still got some fsmash kills that he shouldn't have.
I find leaf shield really nice in this MU. Ill throw a lot of leaf shields, until they start prompting shields (the two hits knock mac up really high and usually allow for a followup if they hit, if not they are at least safe unless you threw it way too close). Once they see leaf shields and use their own shield, I start either doing things like Z drop pressure if I have the luxury and feel it will work, otherwise I just go for dashgrabs into throws. In general, I get a lot of mileage from bthrow/fthrow mixups, u throws, all followed by rising bair or falling uair, or FHFAir -> Uair chains. Anything to keep him off the ground.
You can also float out with him, and threaten bair... wait for the counter, then punish with bair. Otherwise, just let him plummet. You did alright with covering the ledge with dair, but I think going out after him will get you more milage in the MU, because you can force a 50/50 and start making real reads on him, eventually you'll win more offstage than not.
Single pellets are annoying for him to deal with, he generally wants to be attacking and not shielding. I like your fullhop metal blade downwards, yet sometimes they left your vulnerable. Mac can super armor thru them, making them a liability. I'd rather get my kills from bthrow leading to bad situations.
Again, ftilt nair is amazing vs mac and sends him to a bad spot.
I have some trouble with the MU as well, his reward is just way higher than ours so we need some rock solid consistency. Regardless, these are my thoughts, and what generally lets me beat Mac's around my skill level. Best of luck.