Like many products, youtube-dl can be used for legal and illegal purposes (just like a baseball bat can be). However, it was foolish to include links in their documentation to works where infringing uses are more likely. They should have pointed to the MANY works released under CC-BY or CC-BY-SA. Here's one I posted: https://www.youtube.com/watch?v=XC1g8FmFcUU
If this is a real DMCA takedown, then GitHub doesn't really have a choice, GitHub must take it down. youtube-dl should immediately file a DMCA counter-claim. A lawyer can help with this.
I think it's clear that youtube-dl has many non-infringing uses. I've posted many videos on Youtube where I own the copyright, & I really hope that people use youtube-dl to download and see those videos. But youtube-dl needs to do a better job making it obvious that it has many clearly legal uses.