Automakers and dealers are offering deep discounts in response to the slowdown in electric-vehicle sales.