Electron-induced cascade showers in inhomogeneous media