I am not a scientist. If an individual could pass through walls, would that person incorporate some of the properties of the wall into his/her physical body? And would the wall receive some of the properties of the person passing through? Not a smart question?
Jesus passed through walls after his resurrection - but he was not human at that time but rather a spirit.
Nonetheless, a wall is actually mostly empty space. As noted in OP, electromagnetic force is involved, along with other forces of physics. Jesus had great power/energy and wisdom/knowledge. It would not have been hard for him to manipulate the forces of physics so that a materialized human body, which is also mostly empty space, could pass through a wall.