Squiffy, this may be a long shot, but has your little cat been checked out for Constipation?
The reason I ask this is because of the retching, anorexia, pain ( Is it in the abdomen ) and finally, the leaking poo.
Is the Poo liquid with no solids in it?
I have dealt with something like this many, many times, but in People and it is commonly known as 'constipation with overflow' ( Animals are no different in this respect, and with this incredibly hot weather, more susceptible especially if they do not drink enough, and some do not, thus becoming dehydrated although not always obvious in the early stages) .
The bowel gets a backlog of poo that cannot be passed. What does happen though is that the bowel leaks faecal fluid which tracks past the blockage. This is the 'overflow'. It looks like diarrhoea, and many people who experience this think that it what it is.
This is not a sign that the bowels are working properly, it means that the blockage is still there and needs sorting out, usually with an Enema, maybe more than one.
Has your little cat had an abdominal Xray?
That should determine if constipation is a problem as the faeces would show up.
I hope your dear little cat will be okay Squiffy.
Can I please add something to anyone giving their Cats dried food.
In this unusually hot weather, I would not do so unless you are absolutely sure that your cat is taking lots of fluids. If in any doubt, add water, or better still, use 'wet' food ie: canned food or sachets and then add a little water to that as well.
Keep us all posted Squiffy, and xx to your little cat.