There isn't a need to know any high ranking ppl from the army/police/immigration when u encounter routine checks in Bangkok. Due to frequent daily late nights outside, I encounter road blocks almost every night due to the clubs I patronized. Even so, most importantly u must be street smart and prepared for situations like this.
Exit taxi/car in a orderly manner. Inform them u are a tourist/resident in Thailand. Show them the screenshots of valid visas etc. They are there mostly to catch drugs/overstayers. having the valid arrival stamp plays a important factor. As long as u are not a party drug taker or any kind, just cooperate with the officers.
U have the right to take a photo/video recording of the officer who wishes to body search u for drugs or any kind. Do always remember that u should not allow officers to put their hands into your pockets. The procedure should always be u emptying your pockets and they are only allowed to tap U down.
Lastly they would not bring u back unless u look like u are on drugs. Operations like this are always conducted to fatten their wallets. Even if u are caught with drugs like some of my friends, they would often ask for $$ and let u off than to hurl u back to the police station. Sad to say, it's always the case here in Bangkok.
Only unless u are being hurled back to police station, then it's better to know some high ranking officer in the army/police. Lol. Throughout my years and countless encounters with them, I never did mentioned or tried calling someone I know up there cos there isn't a need really. Although I do know them.