Use your best judgement, Sometimes using CompositionLocals is necessary, but it is a good idea to avoid composition locals whenever possible. Also avoiding anything that is platform-specific (eg. AAC ViewModel, ConstraintLayout, and Navigation are Android-only so I'd typically avoid them) and anything that is application specific (eg. direct calls into your application backend) should also be avoided.
All CompositionLocals break widget API modularization because any widget which uses your widget is now implicitly exposing additional public API that they may not have intended to expose and may have considered to be an implementation detail. They are also more difficult to reason about the data flow when things happen implicitly, which is especially troublesome for refactoring. So avoid when possible, but ultimately you gotta do what you gotta do to build your app.