My point was there's an additional anti-pattern at play. As the reader progresses through a sentence, they shouldn't have to mentally cross out previously made categorical claims. This isn't quite the same thing as the stack overflow problem.
I'm afraid I don't see your rephrasing as an improvement. It doesn't substantially restructure the sentence, and to someone familiar with the mathematical writing style, it reads less naturally.
A prime number is a natural number that is greater than 1, and not a product of two smaller numbers.
Commas let you catch your breath and flush the buffer. When there are two many commas, I use a bullet list.