If the mechanism is very oily or greasy to begin with it is always a good idea to give it a scrub in degreaser first. This will not only give the clock cleaning solution less work to do but will also extend its useful life. WD40 will kill your cleaning solution. If after coming out of the ultrasonic tank the pinions/lantern pinions are still dirty it will have to be finished off by hand, tooth picks, toothbrushes etc. You have to remember that some of these mechs have been lying around for 20+ years without being touched which means some of the dried on oil or grease has gone quite hard. If you have ever pegged out the pivot holes after an ultrasonic clean you will still see dirt coming out on the pegwood. Ultrasonics only help to get it clean, they don’t promise a perfect clean on everything. After cleaning a clock through the ultrasonic I will closely inspect each part and finish by hand if needed. I cant think of any cleaning solution or machine capable of getting out every last piece of dirt, it all depends on what substances were last used on the clock, how long it has been lying around for and your cleaning solution and methods as to how clean it will be when it comes out of the tank.
As for how long to leave it in the solution, if its in an ultrasonic tank then you could leave it for an hour for a very bad mech but I find after 20-30 mins it just stops getting any cleaner. If just putting in a bucket of cleaning solution most of the old clock guys would leave it overnight, you can still do this but not with cast brass, you can end up with a bucket of gold mush if not careful.
Hope this helps
p.s don’t believe William, he is the one who adores cleaning dirty movements so much so I have heard he does it for free!