Water clock is also a kind of "mechanized clock", and it can be very sophisticated. There is a strong evidence that in ancient Babylon
and Greece they were used in science, namely for astronomy. In Ptolemy, we can
read records of some astronomical events, like lunar eclipses, which happened during a night, and their time is recorded to a fraction of an hour (like 1/2 or 1/3 of an hour). This indicates that a water clock probably had to be used to time them. What else? Ptolemy mentions water clock only once in his book, (Chap. V, sect 14) only to say
"Of all methods of this investigation... we rejected those using water clock...since these methods are not sufficiently precise"
This seem to indicate that other investigators did use them.
Edit. From the Wikipedia article cited above, I learned that Herophilos used a clepsydra to measure the pulse rate of his patients,
which can be also considered as "scientific purpose". The same article mentions several astronomers who constructed and used clepsydras.
As I said, Ptolemy was not satisfied with the accuracy of clepsydras for astronomical purposes. Weight driven clocks of the Middle age were not more accurate. The first breakthrough in accuracy came when Galileo invented the first clock regulator, that is the pendulum.