Yes, "varied repetition" and it's importance really can't be stressed enough. The other side of the coin to this is that
"memory" is connected to "expectation". So in very general sense musical form is about memory and expectation.
As others have already said, the composer can play with this and confirm or deny the material. This is based on the gradient of how much variation is unfolding. Either way a composer is helped by self imposing some kind of limitation. To say this another way, and in plain english, know the core of the idea. It's a challenge to figure out what to do when "anything goes". No one will blink an eye regardless of following common practice rules, or simply a person improvising "moment by moment". We have all heard so many different style and languages.
So it is useful to know: are you trying to surprise your audience ? Confound them ? Or, what one of my teachers always stressed.....create inevitability. He used to always say "you know the difference between Mozart and Salieri?"
Salieri, you can take this pattern and this one and move it around and no one will notice. With Mozart you change one thing it all falls apart." It's creating the illusion that the music "had to go there". Moonlight sonata, out of all the composition possibilities, had to unfold like that. Same with the 5th Symphony.
Just like the music and emotions thread........ no one can do the work of learning but you.
Great authors read a lot. Transcribing either by ear, or by looking at sheet music and writing it out by hand is very useful. Pick pieces you love. Another common task is to take say 8 measures of a piece you love, and then try and write the next 16. How would XYZ compose this.
Then of course write out your answer, and then copy out by hand the answer from the piece you selected. I still think pencil (or pen) and paper is the way to go. Don't use the computer.
Anyhow..... I will end with a very general list, of things I discovered that became important for my own composing. (this is very subjective. This is just my personal observations, they may be of no use to anyone else, and I am sure there are many others I am forgetting at this moment)
What makes a track/sections coherent to you?
Controlled repetition (Talked about above already)
Staggered Melody
Syncopation
Voice leading
Common tones between chords
Sound Kernels – These are motives or (hooks) which form the entire basis of a composition. The best composers can create the largest universe from the fewest notes
The “Sounds” of Silence
Let the listeners mind fill in the blanks? (Mary had a little .....................) (chainsaw)
Temporization: Ostinatos can often fall in this category. Feels like you are moving without moving.
If you have 16th notes for a measure of just D and F the harmonic rhythm is not moving any faster than if
whole notes were given to those pitches. But to the listener it feels like moving.
_____________________________________________________________________________________
Creating "highlights" (How does the listener know what is most important in a piece. What should we focus on ?) *particularly instrumental music. Vocal music tends to take care of itself, but these techniques still apply. For example what words are most important.
Duration
Doubling
Dynamics
Register
Repetition
Rhythm/Silence
* The antithesis of each can also be a very effective for formal development of your composition. As a general rule pieces that explore a few ideas thoroughly (ie. in variety of ways) tend to be more successful than those that have a multitude of ideas scantly passing by.