Miller, Brevis and Stubbs lifted SA to a strong total after which their bowlers dominated proceedings