I do live in Thailand, in Jomtien and i can affirm that the Immigration Office as per the OPs post has 'gone o hell' recently, it was OK pre Covid!
Some of the officers are very good in that office, but also some are very bad, in their attitude?
Personally I believe that it always pays to be polite to whoever I am talking to, in general it pays off, especially to Thai police and immigration officers.
Now by showing obeisance, are you referring to greeting them with a wai, that's fine,but not just civil servants, and i agree people should try and adapt to Thai greetings, but many are ignorant of that fact? Tourists coming to Thailand for two weeks may not have 'read up' on the subject.
But I state again 'respect' is earned, meaning if some one is respectful to me then I will return it.
If someone is shouting at you/me, that's not respect.
"How would you feel if foreigners came to the UK and started telling you what to do?"
I don't live in the UK but I do keep up on current affairs/events.
Seems to me the UK 'is full' of foreigners telling people what to do?