There is no such thing as safely botting. If you bot assume you will get banned, never bot on an account you don't mind losing.
Botting for short periods of time, using high quality (private or lightly used) scripts, and mixing up the activities on your account are the best ways to reduce your risk of ban, but the risk is always there.