Well, the further you go in the game, the "mega" trainers have stronger Pokemon. So, if you know you have a certain amount of moves, and you don't want to spend coins on any of the power ups before battle, there are a couple things that can slightly boost your chance.
- Try to match Pokemon strategically. For example, don't try to match just one line, look for multiple matches on the board.; plan the board so you can get lots of combos. Take as much time as you need, as there's no time limit in the main stages.
- Try to catch some Pokemon in the expert or special stages. For example, I caught Keldeo and he's seriously helpful. These Pokemon normally have much higher attack and more useful abilities.
- Level grinding makes things easier too. If you take on a level multiple times and don't succeed, part of the reason is because you're under levelled. Go back to an earlier level and replay it until you level your team, ideally one that has the same type as the one that you can't beat, so you can use the exact same team of Pokemon.
There are other options (mainly buying powerups with coins; sometimes this is advised), but try to focus more on these.
Hope this helped! :)