The reasoning leading to the Schrödinger equation goes as follows:
A plane wave in empty space has the following form:
$$\psi = e^{i(kx-\omega t)}$$
Einstein had previously explained the photoelectric effect, i.e. the emission of electrons from a metal surface through light, by suggesting that light is made from photons containing the momentum:
$$p_\text{Photon}=\hbar k$$
and energy:
$$E_\text{Photon}=\hbar\omega$$
This was proven to be correct by experiment.
De Broglie then suggested that the same relations hold for electrons, so that, given the momentum and energy of an electron, one could find the wavelength and frequency of an electron's plane wave:
$$\begin{gather} k_\text{Electron}=\frac{p_\text{Electron}}{\hbar}\\ \omega_\text{Electron}=\frac{E_\text{Electron}}{\hbar} \end{gather}$$
Given the plane-wave function of an electron, one can then use certain operators to extract momentum and energy from it:
$$\begin{gather} \hat{p}\psi = -i\hbar\partial_x\psi = \hbar k \psi\\ \hat{E}\psi = i\hbar\partial_t\psi = \hbar\omega\psi \end{gather}$$
But for a free electron outside of a force field, the relationship between energy and momentum is given by:
$$E = \frac{p^2}{2m}$$
The Schrödinger Equation for a free electron can be derived from this equation by replacing energy and momentum by the extraction operators:
$$\hat{E}\psi = i\hbar\partial_t\psi = \frac{\hat{p}^2}{2m}\psi=-\frac{ \hbar^2\partial^2_x}{2m}\psi$$
Schrödinger now argued that placing the free electron in a Potential would modify the equation simply through the addition of the Potential Energy:
$$i\hbar\partial_t\psi =\biggl(-\frac{\hbar^2\partial^2_x}{2m}+V(x)\biggr)\psi$$
Now my question is: The introduction of a potential is going to mess up the plane waves very seriously, transforming them into something quite different, so the extraction operators for Energy and Momentum - which only work for plane waves, for which they were designed - are no longer going to work! How can the Schrödinger equation still hold up?