fyi: filesystems have max path length/byte count limits, and yt-dlp can exceed that(e.g. "/var/home/username/Documents/Videos/YouTube/Five-reasons-you-want-powdered-detergents-for-your-dishwasher-fourth-one-surprises-you.mp4.part.012" > $THE_MAX_LEN). If this happens, it throws a Python `[Errno 36] File name too long` error and yt-dlp gives up.
This can be mitigated by adding `-o "%(title).150B [%(id)s].%(ext)s" ` to command line, which trims filenames to 150 bytes max. There are other options like --trim-filenames, but yt-dlp don't apply those to the interim part files and that triggers the failure anyway. The relevant issue has been reported on GH years ago and closed by the maintaining author with no PR from me(hey).