Magnetism and Chemistry are not related. Magnetism deals with the alignment of dipoles in a Ferrous metal, whereas Chemistry deals with the chemical, or in this case bio-chemical interactions of organisms. Magnets are created by a magnetic interaction, not by a chemical agency.
You do not mix chemicals together, and create a magnet.
Our bodies are created by a bio-chemical interaction.
If a soul is created at conception, the soul is a result of a organic bio-chemical reaction, and exists only as long as the bio-chemical organism exists. One could argue that the creation of this soul does not involve God at all, that it is simply a mechanism created by God that self-replicates without His interaction.
Whereas if we are eternal, created in a preexistence along with Christ; as indicated in various passages in both the Old and New Testament, then our time here on earth is a “phase” in our progression.
Now, I think in your lifetime you have met people who you felt were genuinely “good” people - people who were good all 7 days of the week, not just on Sundays between the hours of 10am - 3pm. These were people who held deceit, deception, betrayal and hatred of their fellow man in contempt and took every practical effort to distance themselves from those who embraced evil. And I’m sure you have also met people who would not hesitate to use deceit to gain your trust, and then betray that trust to steal whatever they could from you.
On earth - we have passed through a veil, where our certain knowledge of the eternities has been removed from our conscious memories such that we have the free will do chose to do good, or to do evil.
To be eternal, yet to remain forever fixed in place - to never learn, to never grow and to never progress is not what we were intended to for. If God wanted mindless worshipping robots to satisfy his ego; he would have created mindless worshipping robots.
We are here to prove ourselves worthy. Some of us will merit return home, by our faith, and our actions; and others will damn themselves by the same.
Without the chemical reacion in the battery, there would be no magetism in your electromagnet.
If the chemical reaction did not create the magnetism, the it cannot be argued that emergence of a new property following a chemical reaction means the chemical reaction must have created it. You've just demonstarted the creation of a new property (magnetism) following a chemical reaction (the discharge of the battery) that was not created by the reaction.