Throughout the Matrix series, humans have occasionally used the EMP bombs to kill the machines. That means they have the technology to build such weapons. So why didn't they use that to destroy the machines in the machine city and save the humans?
Kind of threefold:
The EMPs were only large enough to be used defensively, to use last ditch to protect the crew of a ship, and after using it the ship would be useless.
Getting an EMP of any size to the machine city undetected would be nearly impossible.
It's pretty well-established that shutting off the Matrix with humans inside would kill the humans, so not an ideal ending there. :(
Realistically EMP is not an absolute, meaning it doesn't always do what you think it does. It is true that electronics can be knocked out rather easily but only if they are 'naked' and do not have any shielding. It is pretty easy to shield against EMP, it's only a matter of want and money. Concrete will actually stop EMP's if it is thick enough, which is what most underground bunkers are shielded with. So an EMP is not something that is absolute insurance against electronics, and it is my guess that most serious machines would have been hardened as they say, against an EMP based attack.
There are various books on this subject, one of the easiest to understand for the unfamiliar is James F Dunnigans How to make war 4th edition. So realistically I would think that the machines are aware of their vulnerability and have taken measures against that kind of counter attack, that is at least what I would do if I was in their position.
One of attack: EMP's knock out other ships, that means you can only ever send 1 EMP to knock out a target. 1 Ship on the other hand can easily be destroyed. Especially by the long range guided missiles shown as a defense for the machine city. It means that it's a suicide mission either way. If you succeed you are defenseless to every machine not destroyed. If you don't succeed you died.
The machines vastly outnumber humans. As far as I remember robots conquered the whole earth and eradicated all humans, while Zion is the only remaining city with a population of 1 million. Considering that our current population is 7 billion, a machine population could be just as big if not bigger (counting all the tiny robots and potentially programs lurking in the machine networks). On the other hand electricity has probably become somewhat scarce after "we" darkened the sky, there are still more machines than humans, as shown in the movie.
Another major point is the delivery and automation. The humans don't seem to have autopilots, at least no autopilots good enough to maneuver the underground. This means every EMP still results in the death of a human crew as pointed out in the first point.
Limited production: The amount of ships that Zion has currently or has produced during their lifetime is limited. It's estimated that both numbers are between 12 and 112.