Make foam rubber case
When you suggest that you are using foam rubber, the term invokes many different types of materials with the same name. The density and stiffness of the various choices provide some challenge to a good design.

The better options include neoprene and also EVA foam. The latter is relatively inexpensive and can be found in the form of floor cushion squares with puzzle cut edges. It is rigid enough from which you can build a box, yet protective enough for your clock.

Additionally, one can find it in various colors, although grey is most common and probably the least expensive.

The foam will melt if you use hot glue to assemble the box. A better choice is a contact cement, specifically a water based product to prevent the foam from dissolving from the cement. Epoxy will also work well, but takes longer to cure.

For a lid to open and close, you can secure a piece of thin leather (long lasting, durable, flexible to one edge and the top or front. Embed magnets in the foam edge to match and you'll have a secure closing system as well.

EDIT: with the additional awareness that the foam is neoprene, I've found there is a solvent based contact adhesive specifically for neoprene. Search for "contact adhesive for neoprene rubber" and you'll have plenty of returns. Amazon lists many and I'm sure there are other sources.

You don't have to have thick rubber to make the magnet idea work either. You can bond a magnet inside a flap of rubber in the box and another flap of rubber in the lid. Use as many as needed to ensure a solid closure.

One might suggest velcro, aka hook-and-loop, but my experience with that material is that it eventually loses grip, as the loops will pull open over time.

Mechanical clasps can be mounted to thin panels of wood which would be bonded using the aforementioned contact cement, but the flexibility of the enclosure may make that too much of a challenge.