The disjointed hitbox moves are strong, but nothing comes for free. Marth's moves have a lot of ending lag, so you can punish it if he ever misses you. Try dashing towards the Marth, then wavedashing back. Get him to attack. AS SOON AS you see him attack dash towards him and drillshine + WD, and follow up with another drillshine, or another move. You can do all sorts of combos on Marth since he slides from the shine. Your ultimate goal should be to get Marth off the stage and underneath the ledge, because then you get to use the 'special' ASDI Shield move, or do an invincible shine spike from the ledge.
Another thing to do is to shield slide - dash towards the Marth and put up your shield. You'll slide a little bit into him. If he tries using a sword attack, he'll lag and you can JC up-smash and start comboing him.
Hmm, what else? Use a lot of JC Grabs. Because a lot of Marth's moves have a large startup lag, you can grab before the move can damage you. Just dash, X+Z, and you got him.
About the edge-guarding situation, if Marth is edge-guarding while standing on the stage (with an f-smash or something), try sweetspotting the edge from below (or get as close to sweetspotting as possible). The advantage of doing this is you can edge tech. Just tap R as you approach the edge. As soon as you reach the edge and Marth is about to hit you, jam the control stick towards the edge, and then roll it upwards. If you did this correctly, you will edge tech walljump, and then you can illusion safely onto the stage.