I have had a simple rule to unfollow anyone who posts off topic, and honestly it works pretty well. A lot of people have accounts just for talking about whatever topic they are interested in.
It does mean occasionally unfollowing someone who has otherwise great content, but often it’s retweeted by someone else I do follow, and anyway - it’s worth the cost.