Let me have a go.
It was never revealed what was in the matchbox, though Compo was seen feeding it.
I think the reason we were never told what was in the box was to make it funnier. It's far more entertaining guessing what's in the box than actually knowing. We'd probably be disappointed once we knew.
All we know is it's something repulsive.
In the 1992 book of Last of the Summer Wine - A Country Companion, there are some suggestions what could be in the box.