About a day before Nygma was attacked, he called Edward. No one knew what they discussed over the phone, but Gordon guessed that Nygma might have deliberately provoked Edward and revealed his location. He wanted to lure Edward there.
But Edward went to find Cobblepot instead, which should have been beyond Nygma's expectations. The two of them had jointly dug a pit for Nygma.
Nygma had lured Edward over to provoke him into hurting him. Edward might indeed have barged in just like that, except he did not actually hurt Nygma. He might have merely knocked him out and made him believe that he had been injured.
Then he put that refrigeration device into his stomach. Given that there were no external wounds, it could only have been inserted through the esophagus. Considering the thing was not large, that was entirely possible.
Then the thing froze Nygma. The principle was similar to how Victor had frozen his wife—it could make someone lose all vital signs while dropping their body temperature extremely low.
So when Nygma was found in the alley, everyone thought he was dead. Even professional coroners could detect no signs of life.
But the abnormal body temperature would soon be noticed by the coroners. They would want to determine what had happened, and their examination procedures included confirming the state of the internal organs. In many cases, they had to open the digestive tract for inspection.
There was a very high chance that the coroner would cut open the stomach to inspect it. Once they found the refrigeration device inside Nygma's stomach, they would inevitably take it out for a look. And once it was removed, Nygma would gradually thaw out and come back to life.
The coroner thought he was a corpse, so naturally, they would not