For what it's worth, I first came across grammar and parts of speech etc at a grammar school in the 1960's. Prior to that I had no clue about grammar in English but I always achieved highly in English exams, and I put that down to reading a lot. A couple of teachers flogged their way through clause analysis and I did not like or understand it then or now.
The French and German I was taught at this school were utterly divorced from real life, 'the duster of my aunt is on the table' being one memorable french phrase I remember learning, Learning grammatical forms just slotted into that experience, and was simply a mechanistic way of applying rules to get the required marks. I got grade 1 GCSE's but didn't actually start speaking French until I was in my later 20's and was travelling abroad.
I think in retrospect that a simple understanding of grammatical structures is useful but this should be a means to an end - helping to see why and how verbs change and plurals are made can also help learners see similarities across different languages and so makes learning easier. Knowing what a noun is and which part of a sentence is the object makes it easier to apply German grammar, or cope with masculine and feminine nouns.
But other than than I can't defend the teaching of grammar for its own sake.