I hope you are aware of all the disadvantages of lossy DNG conversion. The instrument you need is exiftool. With the command below
exiftool -xmp -b -w xmp filename.dng
you can extract the xmp file and you will have as result in this directory filename.dng and filename.xmp
For automation you provide directory name instead of filename:
exiftool -xmp -b -w ...