One common option I've seen in companies I've worked in was to have multiple Slack Channels, one for work, one for general chat.
You can then enforce a strict nohello policy on the work channel on the understanding that the general-chat channel may not receive priority response.
This can be explained in the header for the channel as a rule, and therefore not be considered rudeness.
You can enforce it with a slackbot scanning for keywords and short messages as other Answers here have suggested.