You don't have to do it mathematically perfect, I've always interpreted it as a freer and faster trill when it switches to tr instead of 32nds.
But if you want to do 3 against 8, you can feel it as 3 against 2, with the 2 being an accent on each group of 4 32nds, then just sort of filling in the unaccented 3 notes. You can even practice it as a typical 3 against 2 until you really feel you got the pattern down, and then try adding the rest of the fast notes. Finally, you remove the accents.