I’m never given a bad table in a restaurant because I won’t allow it. Often, I think it’s down to how you carry yourself when you enter the establishment. If they lead you to a dark corner by the ladies room, just say “No, this won’t do.”
This has worked for me for ages. No need to be nasty or haughty, just confident.