Collection visibility animation by drivers

Looks like there’s not way to drive the render and visibility of a collection with drivers. Any workaround you might suggest? I can’t use keyframes.

To make a simple example, when sphere001 reaches 20 in translation X, collection Y will turn off.