according to the oed, the term had been in use in the late 1800s as slang for a teen girl who kept her hair down (which would subsequently flap as she moved). the word must have been reappropriated in the twenties (when long hair wasn't in vogue). not sure where you arrived at 'flap your trap', I would have guessed it had to do with the dresses. the Wikipedia page has got a write up on the etymology that might be of interest.
here's the full definition from the oed:
A girl in her late teens, orig. one with her hair down in a pigtail; a young woman, esp. with an implication of flightiness or lack of decorum.slang or colloq.
the last bit might support your thought that it wasn't exactly a compliment coming from a man.
Are you asking whether the term when it was originally coined was derogatory, or whether it was derogatory at some point during its existence, or whether it is derogatory now, or some combination of these?
You may also have some luck posting this to /r/etymology.
Yes and no.
All etymological origins of "flapper" are disputed ("[F]lapper: a young partridge just able to fly, also applied in joke to a girl of the bread-and-butter age' (1888) suggests the most likely one to me), but from the first decade of the 20th century it was being used to mean the category of young women/girls who were not yet "out" and courtable and therefore could not dress as women (long skirts, hair done completely up, and so on) but were rather developed, so would look odd in a girl's outfit - a 14 or 15 year old, maybe going up to 17. This was not derogatory at all - it was often used in fashion magazines and advertisements just as a description of what age is meant to wear certain clothes.
By 1914, there are more derogatory references, though, that take the meaning away from the age group as a whole and tie it specifically to rich girls of that age who are spoiled and think too highly of themselves. During or after WWI, the age aspect kind of slid away - maybe because the girls who had previously been labeled flappers were getting older? - and it branched out to have several related meanings: fashionable girls, frank girls, girls who were happy to make out, etc. Some people defined the word as inherently derogatory, and others celebrated flappers as the next step towards equality.
Simply, yes. According to the OED, the etymology of a "flap" traces back to 1631, with an attribution to Fernando de Rojas' "The Spanish Bawd" and means a woman or girl with a light or loose character.
The use comes into slang in 1889 as "young girls trained to vice" apparently most often used in Northumbria, England.
It must be noted, that while derogatory, it was like also somewhat reclaimed as women embraced newfound freedoms post-WWI and many point to it as the beginning of feminism. However, flappers were often at odds with older suffragettes, who viewed their perceived "flightyness" as detrimental to their cause.