In Pokémon Go, there is a way to earn PokéCoins without spending any money — by taking over gyms.
Gyms are their own economy of sorts, and like discovering where the lures are in your home area, knowing which gyms to take on at certain times is key. For example, some locations might have a strong red (Valor) presence during the day, making them impossible to take as a member of the yellow (Instinct) team, given that there are so little of you in the area.
Taking a journal (or using a note app) is a good idea. Write down a location, time of day and color of a gym to help you understand the best time to make your move. It’s a commitment, but you will start to notice patterns that you can exploit.
Consult your notes, and you should be able to see how the power struggle goes back and forth at each location. If a gym is Red during the day and Yellow at night, maybe you can cruise by in the evening and install a mid-level party member in there as a cushion against other teams. Then you can finish the rest of your gym run, since you know that it's relatively safe there at night.
If an opposing team at one gym is particularly strong during your evening run, consider crossing it off your list or returning at another time. Bashing your head against a wall will just result in wasting potions. Pokémon Go doesn't naturally heal your pocket monster. You have to evolve or use a potion. If you don't have a plan, you could waste your potions on your beaten up creatures, leaving you unable to fight.