That's roughly how we are told it works when the device is introduced in TOS-Metamorphosis (more EKG than telepathy but the idea is the same):
(Spock is working on the Universal Translator. It is basically a metal tube nearly a foot long, that can be held in the hand.)
COCHRANE: What's the theory behind this device?
KIRK: There are certain universal ideas and concepts common to all intelligent life. This device instantaneously compares the frequency of brainwave patterns, selects those ideas and concepts it recognizes, and then provides the necessary grammar.
SPOCK: Then it translates its findings into English.
COCHRANE: You mean it speaks?
KIRK: With a voice or the approximation of whatever the creature is on the sending end. Not one hundred percent efficient, but nothing ever is.