coffee grinds won't kill grass but my not be a strong enough smell to deter said dog, one owner used to let loose his dog to take little runny diarhea shits on my lawn and the coffee grinds didn't work, had to ante up to vinegar. i think it worked, grass turned yellow but didn't absolutely kill the grass surprisingly. replace a shit stain for a yellow stain.
it was right next to my fence gate so i had to do something as i didn't want my kids accidentally stepping on it, and i didn't want to hurt any dogs.
i think the coffee stopped a bigger dog that used to leave big logs around a tree i had to tend.