Hi Chris and welcome to UK Butterflies.
I have studied Brimstone larvae, so will have a go at this, although hope that some others may chip in.
Firstly, I have to say that a larva's association with its poo (frass) seems to be complicted and confusing (at least to me). I have observed Brimstone larvae moving frass to the side of the leaf when they happen to encounter it. I have looked at all of my larval photos and there are a few where frass has accumulated on the side of the leaf, but only with early instars.
![IMG_0987-01G 2nd.jpg (210.41 KiB) Viewed 653 times Brimstone larva 2nd instar](./files/thumb_3678_42b118d91afd16082bdcec41ead144c7)
- Brimstone larva 2nd instar
This may be because the early instars feed primarily in the middle of the leaf and so move the frass out of the way to the leaf edges. Later instars feed on the outer edges of the leaf, so their frass might therefore naturally fall away as they feed. This may explain why I could not find any photos of later instar larvae with frass on their leaves.
It seems that there have been various studies as to what larvae do with their frass and why. It's only logical to believe that frass and food should not mix. It could be accidentally injested and, if diluted by water, could potentially contaminate the foodsource. However studies have shown that insect parasitoids and other preditors of larvae use odours or visual cues associated with frass to locate their hosts, so this is another good reason why frass should be removed. Merely dropping it onto the ground results in it accumulating around the base of the foodplant, which apparently attracts ants and encourages them to climb the plant looking for the larva. Some species of larvae (like Dingy Skipper) have overcome this issue by expelling frass pellets at great velocity away from the plant using specialised anal structures.
So far this is all logical to me, but there are many other examples of larva who live amongst their frass, where further study is required to explain the advantages. I can just about cope with the argument that species like Large White, Peacock and Small Tortoiseshell, which live and feed communally and produce a lot of frass, could otherwise be at a disadvantage but benefit from group defences (safety in numbers or lots of protective silk).
![IMG_5347-01G 3rd.jpg (348.34 KiB) Viewed 641 times Small Tortoiseshell larvae 3rd instar](./files/thumb_3678_a59385f5833a3be3d074441c4d34d4ea)
- Small Tortoiseshell larvae 3rd instar
But then there are species of lone larvae, like Red Admiral and Painted Lady, which live in tents or shelters which are full of frass, apparently without significant disadvantage.
![IMG_9472-01G 3rd.jpg (239.54 KiB) Viewed 653 times Painted Lady larva 3rd instar](./files/thumb_3678_1fc7487ecdc56016b2b554e09d11d8ba)
- Painted Lady larva 3rd instar
And then there's the White Admiral larva which stores its frass in a purpose-built latrine on its feeding leaf and uses frass as part of a defensive structure. More extreme examples come from tropical regions where some larvae cover their bodies in their own frass as a defence.
Lots of stuff to get you head around and subjects for further study.
Vince