From my experience with ultrafast femtosecond lasers and fiber optic, you are right assuming that the sharp wavefront gets distorted progressively as it travel thru transparent material. Light slow down in transparent material for similar reason electric signal in cable slow down. Electric engineers use as model of cable a large (infinite) number of inductors in series and capacitors in parallel. An impedance matched cable will attenuate a signal but avoid reflexions. Each pair of inductor and capacitor can be viewed as a band pass filter. The phase of the wave is changed with frequency. Each part of the cable absorb the energy then release it after a given time. Electromagnetic waves in transparent material encounter an LC like system that capture the energy and release it after a short delay, making the crest of the wave trailing, which over time delay the signal while preserving frequency. This is a spring/mass delay system where the mass is the electron and the spring is the electrostatic force from chemical bond. Here is in detail how the electromagnetic wave change speed... 580
Instantaneously: The electromagnetic wave slow down right at the interface between vacuum or air and the transparent material. The wave don't decelerate from 100% of c to, for example, 66% of c. It adopt the new speed immediately. Because mass is zero, acceleration tend toward infinity. Suppose we zoom on a single cycle of a wave, let's use the 360 degrees notation. As the wave start entering the first layer of atom/molecule in the transparent material, let say the first 45 degrees, that portion already travel at 66% c while the rest of the wave from 45 degrees to 360 degrees, still outside, continue at full speed, 100% c. Some femtosecond later, half the wave reached inside the material traveling at 66 % c and the rest, from 180 to 360 degrees keep coming at 100 % c. Eventually, over the time of one wavelength, the electromagnetic wave is fully inside the transparent material and will keep travelling at 66% c until reaching an exit side. Note that, contrary to objects in viscous liquid which feel a constant drag and lose speed over distance, light doesn't change speed, but keep a constant speed even in a 40 km long fiber optic. When exiting the transparent material, each part of the wave immediately change speed from 66% c to 100 % c, assuming air or vacuum. There is no acceleration but only an instantaneous change of speed. 580