Yes it is possible to fail a PhD defence and it does happen. Thankfully this is rare.
I’m not in CS so I cannot compare with your peers but you should not make the error of thinking that you need so many publications to get a degree.
If anything, compare a situation where you have x publications as a single author with a situation where you have x publications with many co-authors. Obviously your intellectual contribution to each publication matters; your supervisors and members of your PhD committee can decide you have not done enough even if you have 2x publications because your contribution to each publication has been minimal. I want to emphasize I’m not talking about writing codes or some other such tasks: a PhD is a research degree so your advisor needs to convince your committee and eventually the external examiner that you have made significant and novel contributions to these publications.
I have heard of students failing at the defence stage. This is not pleasant, and it’s a situation everyone wants to avoid. It often (but not always) happens because the candidate is rushed by external events - some visa issue, some family matter, whatever.
In most systems I know, candidates will first go through a sort of “internal defence”, where the student may have to present their work to the committee, or there is some big committee meeting where the final draft of the thesis is evaluated before the thesis is sent to the external examiner. Nobody wants the student to fail so having the committee on board minimizes but does not eliminate the risk of failures. If the thesis is marginal and some committee members still have issue, but the thesis goes out anyways, there could be trouble at the defence with the external examiner.
If you think you have done enough but your advisor does not agree, it’s time to have a frank discussion with your supervisory committee to sort things out, and establish clear milestones for the completion of your degree.