There are many factors which can result in a ban, and worst of all bans are unpredictable and pretty random.
To minimise your chances, play it safe - keep sessions short, use generous breaks, play legitimately in between, and most of all, make sure you accept that there is always a risk! Don't bot on an account that you don't want to get banned.
-Apa