First innings centurion Jacques Kallis was batting on 18 and Ashwell Prince 11 as South Africa closed on 76 for three for a lead of 235.
Playing in only his fifth Test, his fourth against Pakistan, Harris took 5 for 73 -- his first five-wicket haul -- to help dismiss the home side for 291 at tea after South Africa's first innings score of 450.
Pakistan fought back through their spinners Abdul Rehman and Danish Kaneria, who took three wickets for two runs on a supportive pitch as South Africa lost their top three batsmen in quick succession.
Rehman dismissed skipper Graeme Smith (25) and Hashim Amla (0) and leg-spinner Kaneria got Herschelle Gibbs (18) to reduce the visitors to 43 for three at one stage.
Gibbs, reached 6000 runs in his 85th match when he scored his third run.
Three of Harris's victims in the second session were stumped by Boucher as he eclipsed the mark set by Australia's Ian Healy.
Boucher equalled Healy's record of 395 when he stumped skipper Shoaib Malik (73) and then set the record by stumping Umar Gul (12) seven overs later.
“I am very proud to have achieved this record. Specially to break the record of a great wicketkeeper,” Boucher said after the day’s play.
SCORE BOARD
SOUTH AFRICA I Innings: 450
PAKISTAN I Innings (O/n, 127/5):
Hafeez c Kallis b Harris 34
Akmal lbw Harris 42
Younis b Nel 6
Iqbal b Kallis 7
Misbah c Boucher b Steyn 23
Malik st Boucher b Harris 73
Rehman c Boucher b Nel 9
Butt lbw Harris 24
Gul st Boucher b Harris 12
Kaneria (not out) 26
Asif b Steyn 10
Extras: (B-15, LB-7, NB-2, W-1) 25
Total (all out, 97.3 overs) 291
Fall of wickets: 1-71, 2-82, 3-84, 4-97, 5-120, 6-149, 7-233, 8-238, 9-259.
Bowling: Steyn 13.3-2-50-2; Ntini 11-2-48-0; Harris 36-13-73-5; Nel 20-4-59-2, Kallis 11-3-21-1; Smith 6-1-18-0.
.
SOUTH AFRICA II Innings:
Smith c Akmal b Rehman 25
Gibbs c Iqbal b Kaneria 18
Amla st Akmal b Rehman 0
Kallis (batting) 18
Prince (batting) 11
Extras: (B-4) 4
Total: (for 3 wkts, 32 overs) 76
Fall of wickets: 1-41, 2-43, 3-3.
Bowling: Asif 6-1-14-0; Gul 5-1-15-0; Rehman 11-3-25-2, Kaneria 10-1-18-1.