Self-disclosure can help build intimacy because it leads to closeness and to trust. Self-disclosure involves revealing deep truths about oneself to another person. When we talk to our partner in a relationship about things that are very personal, we both get to be closer to one another. We feel like we know each other better. Revealing such things also builds trust. Our partner feels that we trust them. We learn that we can talk to them about things that are very personal. When we feel close to another person and we feel that we can trust them, we have done much to develop intimacy between us.
No doubt self-disclosure can lead to greater intimacy. On the other hand, I'm sure there are many people who regret having disclosed too much about themselves to the wrong person. Your best friend can become your enemy. Your spouse may become your ex-spouse and may have a lot of sensitive information to use against you in the divorce court. Sharing secrets is always dangerous. You have a chance of about one in a hundred that your secret will be kept. You have no real way of knowing that you are receiving intimacy for intimacy, quid pro quo. I am speaking from experience.