I'm trying to find a decent article in English!
As with all fairy tales, there's various interpretations, versions and readings, inevitably. The 'wolf' was often a 'were wolf' and in the older versions Red manages to escape by saying she has to pee ...
The needles and pins were said to be relevant to seamstresses in rural French history, I'm now trying and failing to find good sources ...
It's commonly accepted to relate to female puberty, though.
expositions.bnf.fr/contes/cles/verdier.htm
en.wikipedia.org/wiki/Little_Red_Riding_Hood
Ah, here we go:
www.terriwindling.com/folklore/red-riding-hood.html
that's a good essay - bit more complex than a 'warning against prostitution', perhaps:
'"Perrault's 'girls' are bien faites and gentilles: of the aristocracy. His warning is not simply to girls, but to the well-bred, educated women of high society who, in inviting men and women together in mixed company, set a dangerous precedent. Perrault's wolf is the dapper charmer of Parisian high society, seducer of young women and a threat to the family patrimony -- he is, as one folklorist has called him, the 'unsuitable suitor," who insinuated his way into the best beds in town, deflowering young women and robbing their value as virgin pawns in the marriage de raison."'