An unmanned, AI-controlled, terraforming ship arrives at an earth-like planet (i.e earth-sized, rocky, in the goldilocks zone of its star). Unfortunately for the ship's terraforming plans, the planet is tidally-locked, has no magnetosphere and so is at the mercy of the stellar wind and coronal mass ejections. As a consequence, although it is a somewhat-promising terraforming candidate, it has a very thin atmosphere, no surface water and hasn't developed any life at all.
The terraforming ship sets to work, with the first order of business being to protect the planet from being constantly blasted by its star.
The ship's plan is to manoeuvre an almost pure iron asteroid (something like 16 Psyche) to the L1 Lagrange point between the planet and the star, wrap it in a conductive (possibly superconductive) coil and power the coil using solar panels (or a reactor if necessary).
This will place a huge electro-magnet between the star and the planet. The planet will then be in the asteroid's magnetotail and so will be protected to a similar amount as having its own magnetosphere.
Without the stellar wind interfering, the ship will then be able to move on to the next phase of its terraforming plan.
Is this a sound plan? What improvements could the terraforming ship make to it?
[Edit: this question is specifically about placing a planet in the magnetotail of a satellite not how to create a magnetosphere on a planet.]
[Edit 2: I'm specifically interested in if using a ferometallic-asteroid-based electromagnet at the L1 point will work or not. Suggestions of other courses of action are interesting, but IMO don't really answer the question.]