There is an exploit that can be used if you have a second controller. Connect both controllers and start a game on easy (in the collection game options) with player 1 controller. Play as normal until you run out of lives using that controller, then press start (right touchpad) on the other controller when the continue countdown starts on the player you were just using. Basically keep alternating between players/controllers. This will prevent the game from counting a continue and you can play at your own pace without worrying about dying.
If you don't have a second controller then it must be done legit with 5 or fewer continues. There is no trick to doing it this way other than practice, practice, and more practice. Metal Slug is not an easy game and will require many hours to master the game to pull this off. You must memorize enemy spawn locations, weapon and secret locations, and boss attack patterns. Even then you will die by accident a lot and it only takes one hit. I highly recommend using a 2nd controller if you have one to make this trophy trivial, unless you really enjoy Metal Slug.