When a comparison between phenomena is made for the purpose of explanation, yes, analogy is commonly used in the teaching of physics.
But it is better to say that experimental physics is based on the collection of data about a particular phenomenon, and fitting those data to mathematical models to test how well their predictions hold. And that is not analogy.