Can we think about a particle trapped in a potential well in terms of "quantum measurement"? 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?
 A: The method of measurement has no bearing on the result. The wavefunction for a particle confined at particular position is a delta function, formed from a superposition of momentum states.
$$\delta(x)=\frac 1 {2\pi}\int_{-\infty}^{\infty}e^{ixp}dp=\frac 1 {2\pi}\lim_{l\rightarrow\infty}\int_{-l}^{l}e^{ixp}dp=\frac 1 {\pi}\lim_{l\rightarrow\infty} \frac 1 x \sin{lx}.
$$
In practice, of course, we do not have a true delta function, because as you rightly point out, there is a bound on energy ($l$ does not go to infinity). We can plot the nascent delta function (finite $l$), in which one observes that short wavelengths (large momenta) are needed for a sharp spike (one usually talks of large energies rather than large momenta, to avoid the connotation of movement; the components of momentum are both positive and negative, cancelling out movement)

Incidentally, you can also see the reason for quantum tunneling in the diagram, because a wave function composed of a superposition of momentum states does go to zero outside the central region.
