Ahh. I found a solution: Atomic Parsley.
./AtomicParsley /path/to/media/file.m4v --artwork /path/to/JPEG-File.jpg --overWrite
…does exactly that, and more.
Now my script also reads the XML metadata from the WDTV content info and adds that to the M4V files as well.