Zaslat SMS: How lattice dynamics moderate the electronic properties of metal-halide perovskites