My father has a tiny box in the shape of a coffin, about 15 cm x 4 x 4, that takes a coin and then a dead hand comes out and grabs it, followed by a nod of the skull in one other end. Mechanical, from the 70s.
A machine whose only function is to (amuse and) turn itself off, is indeed more interesting. Just sharing memories.
Back in early 80s I saw the same toy, but in a form of a toilet. It was a piggy bank.
A small plate was attached to the front of the seat, and the seat had its cover closed. Hand would appear from under the cover, steal the coin from the plate and follow with a flushing sound. It was really funny and it was, of course, made in Japan :)
This one is supposedly 7 years old, so it predates the trunk version. It also looks less artistic and that's a good thing in this case if you ask me.