My thanks to everyone who got in touch. I have to say that I was delighted with that little exercise - so much creativity - I am impressed, and greatly cheered up. Apart from a temporary problem I am having this morning, thinking about steamed cod-pieces and giant fat-balls, I was profoundly touched by the friendly, supportive spirit in which my possible foibles such as shrunken head collecting were glossed over - accepted on the nod - without any hint of disapproval. That is kind and diplomatic; if I had a heart, it would be warmed.
Many of the suggestions are more exciting than its true purpose, but I shall now reveal the correct answer...
As a couple of people suggested, it is a device to assist in cleaning a baseball-type cap. As far as I know, it can also cope with a baseball cap which is worn backwards, which is pretty good too - high marks for versatility.
The weird bit is that, as revealed in the photos, the device is intended to be used in the dish-washing machine. Yes - quite so.
My "lucky" walking hat has now been with me for 10 years - I have worn it in the Alps, on the Danube, along Hadrian's Wall, around the fortifications of Chester, Berwick, Carlisle, Denbigh, Salzburg, on my visit to the Eagles' Nest, in Vienna, at numerous recent wargames (to avoid the overhead lighting setting off my ocular migraine) and all sorts of other exciting activities. I reckon this cap has also accompanied me during a couple of hundred mowings of my lawns - we have been inseparable. I've lost it a few times along the way, and some of the occasions on which I found it again were unlikely - occasionally they might even have been far-fetched. Critics have queried why, since I bought it in Austria, it says "Austria" on it - in English. I have no answer to this - I assume it may be something to do with British and American tourists probably not being expected to know what Österreich means. Whatever, it is my friend. Like me, it got soaked through, walking the last few miles into Wallsend in the footsteps of Hadrian. It also walked across the great bridge at Regensburg when slightly too much beer had been taken. You get the idea.
Recently it has been quarantined - it has become, with use, smelly and unappetising, so a wash was prescribed. We obtained the gizmo under discussion, and yesterday I fired up the dishwasher, specially. Cool, quick wash cycle - no lemon in the cleaning capsule [discuss?].
Seems to have been successful - it's still drying, but looks (and smells) far better. Now I'll have to come up with some special trips on which to wear it again. Sounds good.
My friend De Vries suggested that the device might be a Scold's Bridle (also known by various other names) - a medieval, cage-like device which was fitted around the head of a gossip or similar, with a tongue clamp. Horrible thing - I saw a few once, in a museum in Rothenburg ob der Tauber. No it's not one of those.
***** Late Edit *****
As a bit of evidence, here's a shot of my cap on tour, at the big castle in Salzburg, when I was younger, and still allowed to go on foreign holidays.