Punctuation combines two very separate things. First, it structures the logic of the running thoughts. The rule you cite is an example. But second, it reflects the natural pauses of careful speech, and the four stops , ; : . mark pauses of increasing length. The two aspects are not quite compatible. Since good writing is without exception good speech, the second aspect sometimes overrides the first. Therefore good punctuation can be somewhat inconsistent with the logic-based rules for good punctuation, and the commas in your example are entirely correct.
The rule about avoiding run-ons should always be checked with the way you would read a sentence carefully to convey its meaning to your listeners while demanding the minimal effort from them.
Student or Learner