'Cop' is an informal term with a very long pedigree; it's related to the German kaufen, but means, roughly, get or receive; or, in a usage widely known. arrest (that's what a 'copper' does).
By chance, the other problem word has Germanic roots. When aircraft were first used in warfare they were virtually invincible. German scientists devised a system of anti-aircraft weapon called Fliegerabwehrkanone (abbreviated 'flak'). When you receive a hostile reception you 'take the flak' ('take' is the version I've heard; 'cop' is current in the Australian 'cop it sweet' - which means to accept defeat without whining).
'Flack' is just a typical English misspelling; we often borrow a word and then return the favour by mispronouncing it and misspelling it!
Interested in Language