I learned (an academic expression of) German grammar at university, in computational linguistics. There was a class „Syntax I“, and it had us break down phrases and sentences in a graphs, a (constituent) C structure and a (functional) F structure.
Yeah, I loved my university-level grammar class, which I took as a requirement for a TESOL (Teaching English to Speakers of Other Languages) certification. But I was able to speak and read and write at an extremely advanced level long before that. In fact - though I got a private kick out of breaking down sentences, and it certainly was a help teaching second-language speakers - I don't think it helped my own ability to express myself in English in any way. Grammar's fun for nerds, and useful for adult language acquisition, but not worth the time it takes to teach to the general population.
Best class I ever had!