Vs Marth is mainly stupid and frustrating if your reactions and tech skill are not spot on.
Before you approach this matchup, knowing how to DI is extremely important, and will make the matchup 1000x more manageable. Whether it's DIing to avoid combos or DIing his KO moves, doing it correctly generally will make Mario survive pretty long in this matchup. The idea being that you deliberately avoid his D-air and tipper F-smash combos at all costs. Surviving past 160% against Marth shouldn't be uncommon provided you just avoid those two moves and edgetech consistently.
The hard part of the matchup is obviously working in. Basically the main thing in this matchup is you MUST know how to WD out of shield, which lets you punish most of his non SHFFLed aerials, tilts, and Smashes. Once you do actually get in though, Mario's low percent combos on Marth are great provided you don't mess up. At 0, I personally prefer to do Jab -> D-throw -> U-tiltx2 -> U-air juggles.
Besides crouch canceling, crouching generally speaking is heavily underused against Marth as a means to keep his spacing in check. Any time Marth does an aerial that isn't specifically SHFFed, you can basically duck under it and F-smash him. It's something to keep in mind during the heat of the moment.
As for edgeguarding Marth, your main goal is to simply B-air him once offstage, and it usually gimps him. Ledgedrop B-air with invincibility frames usually seals the deal if he has to recover low. If he recovers higher, it usually isn't that risky to rush him down offstage either.
I'd put it 60/40 Marth.