Usually, when I'm thinking about a quantum measurement, I see a sort of particle that is being hit by a photon. The more energy the photon carries, the more the momentum of the particle is disturbed, but at the same time the more precise is the measurement of the particle's position.
But recently, I was thinking about a different scenario. Let's say, that our particle is trapped in a finite/infinite potential well of width $d$ (the distance between the walls). Now, if we would move the walls closer to each other (as a result, reducing the distance $d$), the particle would become "more localized". I guess we wouldn't be able to move the walls infinitely close to each other, because it would probably require an infinite amount of energy, but I think in general there is nothing stopping us from bringing them at least just a little bit closer.
What would happen to the momentum of such a particle? Is this even a reasonable scenario to think about in terms of quantum measurement?