The code you're showing isn't possible because collectionGroup() returns a Query object, and doc() isn't a method on that. You will have to query the collection group to find the document you want, then delete it as a separate operation. Also note that it's entirely possible for there to be multiple documents with the same ID within a collection group, as the group spans any number of subcollections.
Keep in mind that a query on a collection group can't filter all of the documents based on document a document ID. Typically people get around this by writing the ID of the document in a field of each document, then using that field as a filter on the collection group query.