This is a huge problem and I have even posted about it in the support forum. All my Ultraballs and Greatballs are gone now so I have to stop the Bot and farm pokestops some time. CP based strategy is the only good option here otherwise you risk missing on all the great rares that will flee if you are not using proper ball management.
Hope this and the IV is a prio.