How likely is a lack of DNA match with a distant relative?
First, if you haven't read it already, I highly recommend Carl Zimmer's &quot;She has her mother's laugh.&quot; for anyone interested in ancestry/genealogy.
In it, he presents the following figure showing the probability of sharing any autosomal DNA with a given ancestor as a function of the number of generations separating you from that ancestor. (notably, this analysis excludes the very real possibility of intermarriage within a family tree).

So, for example, if you were to look at one single ancestor from 10 generations before you, there's a little less than a 50% chance that you share any of that ancestor's DNA (remember that at 10 generations you have roughly 1,024 ancestors).
So, at 5-7 generations there's still a high probability that you both have at least some genetic material from the same common ancestor(s). But, it's much less likely that you both share the same pieces of that genetic material (probably in the 10-14 range on this graph).
Plus, very few (probably none) of the commercial DNA ancestry sites do full genome sequencing for ancestry comparisons. They look at a limited number of specific regions that can help identify familial relations. So, even if you do share common ancestral DNA, it's less likely that it would be detected without whole genome comparison.
Image Credit: https://gcbias.org/2013/11/11/how-does-your-number-of-genetic-ancestors-grow-back-over-time/
Edit
I just wanted to edit and reference that the above analysis was calculated by Graham Coop and colleagues. I did a little more digging and he's got a blog post (How many genomic blocks do you share with a cousin?) with a more relevant analysis for you're specific question, showing the probability of two &quot;cousins&quot; having zero shared DNA blocks as a function of how many generations back the two shared common ancestors.

Reference: https://gcbias.org/2013/12/02/how-many-genomic-blocks-do-you-share-with-a-cousin/