IIRC Hero of Alexandria made a similar device 20 centuries ago: a horse statue that could had its head cut with a sword, without it falling down, with a set of gears that let the sword pass through the neck of the statue without letting the head go.
head cut ... without letting ... go.
My mind works in mysterious ways. First thing I thought of [1].