Does it clear out all the baggage, or only allow the baggage to come to the surface ?
Good question - I think that varies from individual to individual.
In meditation, the ultimate objective is to cut ignorance at its root which obviates the need for dealing with all the little branches and leaves. Simply trimming the leaves and branches is futile.
If the conceptual hierarchy is blighted with falsity and error, then you must first know what that error is before it can be corrected, otherwise the result will be a reaffirmation of the previous error. It's also not always wise to bring deep trauma to the surface. Re-living trauma as a flashback can be very disturbing, often becoming a source of emotional over load in the present. A general desensitisation from the emotion is a better option, but in the case of severe trauma, it's best not to begin by trying to unearth it.
Meditation can dredge things up which are better remaining hidden. Maybe a good Master who is also a skilled psychiatric practitioner would help with these things, but I doubt there are many who fit that bill.
Also, being alone with thoughts has a tendency to magnify them greatly. If there is not an outlet, or the person is unwilling, or finds it difficult to talk it out with a confidant, these thoughts can become powerfully energised and that can certainly lead to psychosis if they become obsessive.
For these reasons, and others, I would not advocate meditation for the treatment of mental illness in most cases, although I do think it can be an effective adjunct under skillful guidance, especially mindfulness type practices. They've become quite popular in psychotherapy but mostly for neuroses, I think.
One of my favorite gurus is Anthony Demello, a Jesuit priest and psychologist from India.
He sometimes discussed the quandary he found himself in as he tried to decide whether to act as a spiritual guide vs therapist for people. He felt that the therapist in him would often want to ease the pain whereas the guru saw the value in allowing or even accentuating the pain to foster a breakthrough.