Cassius, so, we do essentially the same, except that we just delete everything older than "7 days", or to bring the disk down to 70% full, which hits first instead of deleting only the expired/deleted plans.
We then have a plan with enough jobs that theoretically every agent, if they were doing nothing, could run them in parallel, and that every agent is needed. In practice, of course, some will be doing something, but that's fine. This then checks the directory, and does the deletion. This is then run every hour. Sometimes agents are missed, but in general, every agent is hit every day, and in this way you can use Bamboo to clean itself up. Which is really something that we want Atlassian to implement!
Especially since this solution only probabilistically cleans every agent, instead of guaranteeing that every agent is hit x times per day.
it's highly ironic that the bamboo remote agents lack this very very very very (repeat 100 times) basic feature while Bamboo licensing strategy is based on how many remote agents you have...