South Africa fell behind early on to a Emiliano Boffelli penalty, but they hit back through Damian Willemse's successful kick and the opening try followed 10 minutes later.
An offside Santiago Carreras attempted to stop Jaden Hendrikse from grounding the ball and a penalty try was awarded, with the fly-half also being issued a yellow card.
Boffelli moved Argentina back within four points from the boot, but the ball was popped up to Hendrikse and he burst through under the sticks to give the Boks breathing space.
After Willemse added the extras, the visitors pushed on and had a third try through Marx, who crashed over following a sustained spell of pressure.
Argentina's hopes of recovering were further dented when referee James Doleman sin-binned Gonzalo Bertranou after losing patience for a series of infringements.
South Africa could not entirely put the game out of reach and were themselves down to 14 after Willie Le Roux, having already been warned, strayed offside.
Tomas Cubelli appeared to spill the ball when charging through and attempting to touch down, but it was deemed Kwagga Smith illegally intervened and a penalty try was given.
Smith was also yellow carded for that offence, yet it was the Boks who finished strongest as De Allende and Marx added two more tries to seal what seemed an unlikely bonus point.
Boks take it to the wire
South Africa have struggled for consistency in what has been a wide-open championship, but back-to-back wins for just the second time this year has them right in contention.
Some inept officiating may well be the big talking point to emerge from this contest, though the Springboks did what was asked of them and now need a favour from Australia.
Argies lose their heads
Argentina have defeated both New Zealand and Australia this campaign, but they were far too undisciplined against South Africa and lost their heads in the closing stages.
With this defeat, Los Pumas' wait for back-to-back home victories will stretch into an 11th year.