Botting battlegrounds will always have the highest risk of getting banned, simply due to you playing with loads of real players, unless there are several bots (which makes thing even worse, as having multiple bots doing the same pathing looks ridiculous) you have at least a dozen of other real players on both teams and lets be honest, spotting a bot during PvP is not terribly difficult, especially as 99% of all bots relay on the same scripted pathing and behaviour so they all do the exact same thing over and over during the battle and they all follow the exact same path etc..
Botting dungeons and other content is not even close to being as risky due to the fact that you are playing with far less real players around you, so there are far less people that could report you and playing PvE the bot does normally do a great job in terms of both DPS and healing (not so much in terms of AFK tanking, especially this late in the expansion as it won't rush the dungeons like real players would do) so people will have a harder time noticing and most players don't really care and won't report you regardless as long as the bot does a good job during the run and frankly it normally does.
Farming and levelling is even less risky as you'd normally bot around other real players in small amounts of time, and even when you are playing in areas with a larger amount of players around you will most likely not be around the same player for extended periods of time.
Webhond, is it really any safer to afk farm Ashran compared to battlegrounds? I have no experience with botting Ashran but I suppose it relays on the same kind of static scripting as battleground does and there is a huge amount of real players involved in Ashran so how is that supposed to be any safer compared to doing battlegrounds? Unless you do the movement yourself using Enyo, but using Enyo even battlegrounds will be safe 99% of the time.