Played vs a Marth the other day and gonna try and give some insight on that matchup. It's difficult as hell, but we already knew that.
Basically, all you want to do is get Marth above you. At low percents, try to get things going by crouch-cancelling obvious Fairs. Dtilt is a very good option as it's fast and put Marth in a bad position. At high percents, it gets a lot harder. If you're at a high percent as well you can try to bait Fsmashes and other kill moves so you can go for the kill. Dash attack to punish is also a pretty underrated option for racking up percent. Getting a grab vs. Marth is amazing, but a good Marth makes it very hard to do. If you get an opportunity, definitely take it. You can't afford to miss any punishes in this matchup.
Once you get Marth into the air on your terms, he gets destroyed, especially if he isn't watching his DI. On that note, DI mixups are really good when he's in a juggle position. When you know they're trying to DI out of an Uair juggle, Fair them instead. Flower Pikmin Fair + Bad DI = Early kill.
You want to avoid Marth's grab with every fiber of your being. Olimar's weight basically means if you ever mess up your DI, you'll get tippered and possibly killed. Marth can also juggle you just about as well as you can juggle him, so keep that in mind if you end up on platforms. This applies for every matchup, but always, ALWAYS have a Purple on hand that you can toss it at him when you're trying to get back on from the ledge. Also, if he Fairs a Pikmin, the hitlag leaves him pretty vulnerable, so if there's an undesirable Pikmin in your lineup, throwing him into Marth's sword kills two birds with one sword.
Marths edgeguarding is pretty absurd vs. Olimar, so try to conserve your doublejump and aerial Pikmin pluck to mix up your recovery. I'm not sure if this next bit works because I never bothered to try it, but using B-reversals to mix up your recovery even more is probably worth a shot.
Try to bring him to large stages, especially ones with high platforms. Dreamland is the best possible stage for this, I feel. I also like Battlefield because of how many Purple Pikmin you get. Low ceilings are also nice, but not that important.
It's pretty bad, but at least it's winnable. However, just because it's winnable doesn't mean we shouldn't complain about it until the PM Devs give us some anti-sword tools.