My parents raised me to always say "yes sir" and "no ma'am", and I automatically say it to service workers and just about anyone with whom I'm not close that I interact with. I noticed recently that I had misgendered a cashier when saying something like "no thank you, ma'am" based on their appearing AFAB, but on a future visit to the store they had added their pronouns (they) to their name tag. I would feel bad if their interaction with me was something they will remember when feeling down. This particular person has a fairly androgynous haircut/look and wears a store uniform, so there's no gender clue there.
I am thinking I need to just stop saying "sir" and "ma'am" altogether, but I like the politeness and I don't know how I would replace it in a gender-neutral way. Is there anything better than just dropping it entirely?
For background I'm a millennial and more than happy to use people's correct pronouns if I know them!
Sidestepping cultural appropriation, I would go with "sama" for the timebeing. It is a Japanese honorific. They did theirs right, most of their common honorifics are genderless. Hell, the really common ones can be used to refer to literally anything to show respect.
https://www.fluentu.com/blog/japanese/japanese-honorifics/#toc_5