At the “heat death” of the universe, there is no energy available to do work. Everything is at the same energy level - zero. Everything is at the same temperature. Nothing is moving.
So this thing would stop too, just like everything else.
Heat death occurs when t=infinity. Thus the clock wouldwork forever.
Also the universe is expanding, heat death does not equal no motion.