I get a little more samus practice than most. I'm no top player but I might be able to help a little.
Rule #1: Be patient. If you try to rush the matchup you'll eat missiles, dsmashes, up-b OoS, go too deep for edgeguards and just hang yourself. It's hard for her to really pitch a tent and camp you; you can swat away her missiles with a number of moves; in fact, if you fsmash within range of her, you will not only break her missile, but still hit her through it. It's really stupid. Take away her space so she can't shoot at you anymore, and pressure her shield from out of her up-B range; what's she gonna do, shieldgrab? Roll away at the speed of snail? That ain't the boost ball. fthrow combos into fairs and more if she misses the down-and-away DI. If they get the extender, respect the space it covers and know that it can home in on you. Then punish the crap out of it when you make it miss. It is a winning matchup onstage. Trust that you can get an opening if you play methodically and that you can punish pretty well when you get it, and just play relaxed and wait for that opportunity.
Samus does have some decent spacing moves. WD ftilts, nairs, and dsmashes do reach pretty far, so don't let those catch you off guard. Be smart when she's got a charge shot. Bait it or just don't put yourself in a situation where you can't shield/dodge it.
The advantage Samus does have is the edge game. She can run off nair and trade with your up-B which is really dangerous, and she might do that but then mix in utilts from the ledge. You have to stall creatively and use a lot of mix-ups (early up-b, side-b stall to late up-b, up-b further out from the stage and airsteer down to the edge etc.) to get around that. If you get knocked off the stage high, save your double jump, side-b stall or fastfall to avoid missiles, because she can kill really easily with edgeguard missiles.
As far as edgeguarding her goes, you really have to just wait a lot of the time. If you catch her slipping there are times where you can safely grab ledge, drop off and swat her out of her grapple with a bair, or run out and fair her. But remember that her recovery is 3 times as good as yours and that you have to go out, swing once, and get back to ledge quickly. Good Samus players will mix in using single morph ball bombs instead of bomb jumping, hitting you with the grapple, sweet-spotting the edge with grapple, rising grapple, walljump up-b and a whole bunch of other stuff. And for the love of god, don't get hit by ledge-hop charge shot. That's just embarrassing.
Hope this helps.