On the third syllable, and that is the surprise, because the stress moves around in this word family. Pedagogy is stressed at the start: PED-uh-goj-ee, or PED-uh-gah-jee in American English. Add -ical and the stress jumps to the syllable just before the ending.
This is a strong rule. Words ending in -ical or -ic almost always stress the syllable just before it: logical, political, psychological.
The word goes back to Greek, to the name for the person who took children to school. Its two g's sound different. The first, before a, is hard. The second, before i, is soft: GOJ.
Say the last three syllables first, GAH-jih-kl, then add ped-uh in front.