I would like to add to Allure's answer. I think your decision should also depend on your motivation to do a PhD. Are you doing it just because you want to learn and love doing research (or, you loved it and think you can love it again when you get your self-confidence back) or is getting a job in academia also an important factor?
Especially if you are doing it mostly because you love learning and research, I would suggest not to take decisions of rejection/acceptance of papers as seriously. The few submissions you mentioned are not that many data points anyway (there is some randomness in the review process). Moreover, especially at top conferences, the bar is very high -- (almost) all the papers they receive are very good and most of them end up being rejected. Just the fact that your supervisor decided that your paper has a chance to get accepted at a top conference reflects positively on you!
It is completely normal to have papers rejected, it happens to everyone. It reminds me how one more senior researcher in my group who is one of the top researchers in the area once said that we should not feel bad about rejections, that he has had more than any of us [other people from the group].
If your goal is to find a job in academia, the decision process is slightly different. Getting a job in academia is tough. You may decide that you have little chance to get the kind of job in academia you would want. In such a case, it would be understandable to quit. But even in that case, I don't think there is any right/wrong choice. It depends on what you want in your life.
So to summarize, do not let a few rejections crush your love for learning and decide based on what you want to get out of PhD.