Whether it is appropriate or not, I don't know. I built a box out of sparse decking wood a few years ago. And we use the compost for the kitchen garden.
It doesn't make sense to build it out of untreated wood. Then the box will decompose at about the same rate as the garden waste.