Not sure what bot you using, but it is possible to detect the warning messages you get before a ban and force a pause.
Request this from who ever you got the bot from. If they don't / won't do it, can check out my signature for a Soundcloud bot with this functionality that does update / add requests from users on a regular basis.
As to how many can you follow and unfollow, it changes all the time. Plus I believe it changes depending on account age / proxy to an extent.
You say you got a temp ban at a 1000, so try 800
Although I would say go even slower than that. Botting is not about hitting the site as fast you can, but going SLOW and STEADY and keeping your head under the radar.
Set a good pause after each action, make use of schedules / repeat actions (if your bot has this functionality, if not then you know where to look
For example, I would set up a routine to search and follow users based on your genre at about 50 every 12 hours (requires this functionality), upto a max of 1500 users (again if your bot does not support forced stopping....).
Then setup an unfollow routine, repeating every 24 hours , to unfollow all users who do not follow you back that you have followed for more than 7 days (again you need the functionality to do so)...
Then I just let it run on my VPS 24x7