Question: how many coins do u actually get for having a Pokémon at a gym for 24 hrs?
It's not holding it for 24 hours that pays.
In the shop you have a button in the top right that basically is your cash out button. For every pokemon you have in a gym *at that time* you receive 10 pokecoins and 500 star dust. The button has a 21 hour cooldown. It doesn't matter if your pokemon get kicked out 10 minutes later. It does matter if you put your first pokemon in a gym and it gets kicked out while you run to the next gym.
So try to get as many pokemon into gyms as possible, then cash out. Repeat tomorrow.
For example. I can see six gyms from my apartment. For the last two days I checked after waking up who is holding the arenas and then I consider if I can take em out, if there's an empty spot in gym of my team because someone already took one over, or if I can quickly train up one of the gyms to add another of mine.
I also visisted my mother on friday and noticed there was an arena nearby, so I put my 1200 starmie in it after traininig it up a level. Since it's a very rural area, it's just sitting there unchecked for 72 hours now.
I then put on my running shoes and run to each gym where I can put a pokemon in, and when I'm done I cash out.
I really think the pokemon should have in their stats how much coins and dust you've earned with them so far.