Replying late but our B had this problem for quite a while. It's called bilious vomiting syndrome. Usually the vomit is yellow foam in the morning when they have an empty stomach. Our vet suggested feeding 3 meals through the day with the last meal as late in the evening as possible and then the moment they wake up, feed them right away, even just a spoonful is good. Our B had this issue on and off for a good 4 months before it eventually going away, the feeding very first thing in the morning seemed to help. She's 9 months now and it still happens occassionally, the last time was when we forgot to feed her dinner the night before. She's otherwise totally healthy.
Sadly this was a totally different issue at the time. It was dry and repetitive even post-feeding. Ended up being nothing which is odd but he's all good now 🙂
I once saw a basenji clicker trained to scratch at the proper grade sand paper that was glued to a board. The basenji even curled his paw so the pads were not injured. This kept the nails perfectly trimmed. Perhaps the scratching/digging behavior could be re-directed into the more productive behavior and nail clipping would never be an issue!