質問: Is there a rule specifying the only part that can be negated?
回答: The sentences 飲んだことがない and 飲まなかったことがある are different. 飲んだことがない is translated as "I have never drunk", and 飲まなかったことがある is translated as "There were times when I didn't drink." The negative form of 食べていない is 食べていなくない, and 食べていない is identical to 食べないでいる. The negative form of したことがある is したことがない. The negative form of したことがない is したことがなくない but it is rarely used. したことがない and しなかったことがある are different as I explained. 買ってくれて欲しい is unnatural. If you want to say "I want you to buy a car for me", it is "私に車を買って欲しい". The negative form of 買って欲しい is 買って欲しくない, and 買って欲しくない is identical to 買わないで欲しい. In addition, 食べないでいない and 買わないで欲しくない are rarely used. They are summarized as follows: "Negative verb + verb" has the same meaning as "verb + negative verb" like 走らないで行く and 走って行かない and they are translated as "go without running". And "negative verb + negative verb" is rarely used. Here is a related question: して行{い}かない versus しないで行{い}く