BTST ? How to prevent danger of Auction?

I am into BTST trading and doing well but today I learnt about the danger of shares going into auction and penalties… how to avoid that? I understand the risk of Auction if I BUY something today and SELL it tomorrow but what if I sell on T+2? Is there still a chance of Auction?

Pls clarify @ShubhS9

T2 sale no issue at all but demat charge will get deducted as shares would have come by 4 pm to demat

someone I know got slapped with auction penalty even on T+2 but that was 4 years ago… not sure if it happens even today… @ShubhS9