Yes, JRM's cake point might work if there hadn't been other parties. In other words, Boris was ambushed with a birthday cake. Most people would accept that a cake presented on someone's birthday at work is not a party. But of course, there were other parties.
The question, which hopefully Gray will answer, is the extent to which Boris Johnson organised or if not, knew about and consented to, all these parties. There is one fundamental difference between what happened at no 10 to the Ferguson case however. The people at No 10 were all working in proximity to one another (assuming no one was invited from outside) whereas Ferguson allowed a third party, his mistress, into his home.
I've no doubt all this came about because of a climate of ill discipline at No 10 created at the top ie Boris Johnson. Whether allowing such a climate to exist is a resigning matter, or whether responsibility lies solely with those civil servants who took advantage of the climate, remains to be seen.