Arguably even config is too much and generally functions should only take the subset of config.
In the end this is more art than engineering: classes allow encapsulating all state that needs to be used by all functions together; but as you start making exceptions you'll end up with the mess you describe. The art is finding the right balance between what goes in a class and what should be a standalone (possibly generic) function. Personally, I'm still far from mastering that art.
Alexander Stepanov has a lot to say about this.