When I was a kid, I thought like most kids do that all you had to do was "get technique" and then apply it to the music.
Do you mean technique learned separately as in doing scales and etudes, and then you "have it" so it just automatically comes into the music? Or something else?
Playing piano is about efficient, small, controlled, precise yet "easy & free" movement designed to produce specific musical sounds.
In the end, there is no difference between the music and the technique since to get a desired sound requires a certain way of playing a key.....
Will comment on that a bit further down.
Nothing you do before or after engaging this small area of key/lever contact contributes directly to sound production.
Yes and no. Because we ourselves are anatomical beings and the fingers pressing the keys are attached to/part of hands and arms which in turn are part of a body sitting on a bench with feet on the floor. I absolutely will not get into arising debates about correct methodology and such. Ultimately there has to be a good balance of things which for students a good observant teacher will find for the individual, and self-observation plays a role too.
In my own case, my fingers moved from a motionless hand and arm when playing melodic passages. The loosening and liberating of the body ultimately involved even the feet and head. While we don't use our heads or feet to press keys, and even though the piano key moves only a short distance, engages the hammers and the rest, in reality the whole body works together.
This part goes more toward where my interests are currently.
In the end, there is no difference between the music and the technique since to get a desired sound requires a certain way of playing a key.....
The relationship between music and technique. Actually I will say music, technique, and theory. And I think to some degree feeling comes into it too. Theory being the understanding of the music, rather than an abstract thing here.
For example, in Sweet Dreams we have phrases (theory/understanding), and countermelody (ditto), with the phrases reaching a climax and then falling off. That is the musical vision. We then need to think how we want the sound we imagine to happen. We want the outer sounds to be louder than the inner sounds. How, physically, do we do that? That is technique which is an interplay between the instrument and the body.
There are times when you are learning when you actually have to divorce yourself from the sound you want to create, and just learn how to move. For example, I used to associate staccato with a stiff, jerky movement, so to learn the right movement, I had to not imagine the sound - get the movement - and then be able to produce the sound through that new movement. But sound, music, and movement are still intertwined. You are just coming from different ends of it. What you need to work on, and how, depends on where you're at.
There are other aspects such as how to organize all that, and more aspects about the whole course of learning. For example, at a certain stage I would not want to play very musically if some foundations are being lain down at beginner stages, because those foundations support everything else. If I am just learning to coordinate pedal, then I will not want to do fancy footwork for even nicer effects, because physically I'm not ready for it yet.