If you detonate a nuclear weapon above a city, no matter how far above, you will call upon you a nuclear response. There’s no difference between an EMP attempt and a nuclear strike. So why would you attempt an EMP attack when that means giving up most of the destructive force to maybe burn out powerlines, and guaranteed surface nuclear response on your territory?