how about a picture of the other side, and some at oblique angles?
Are you sure the exploded view is for your hub?
Nigel
With the dyno section on the left side; the threading should be standard right hand, meaning counter clockwise to loosen. The drag caused by the dynamo should tighten the thread.
Is there enough meat on the hex feature to clamp it in a vice?
Nigel
Please share a picture of your homemade wrench.
It is not possible to separate the magnet from its backing without destroying it.
The bearing cups - possibly, but may be impossible to find replacements.
Recommend clean things up the best you can, and when you reassemble use a water resistant grease - lots of it, to keep the water out. I use boat trailer wheel bearing grease - inexpensive and designed for loads and speed far higher than any recreational bicycle application; and far worse environments.
Nigel
If magnet with steel ring is not glued or welded but just pushed in it could be possible to remove with special tools. I at least have idea to drill holes on another side and either screw in screws or use rods to push it out. But I'll do it later maybe I can find ways not to damage lid.
Today I bought and installed bearings with cups, they were different but fitted.
Wanted to learn more about grease. Probably most of them are resistant to water. Which of them is slickest and best for part durability, containing teflon or graphene particles? I use what I have - universal grease Amsoil 1500 NLGI EP2 or russian "Solidol"
You asked for homemade wrench photo here it is. I used just aluminum alloy part from window blind that was thrown after building remont and it happened to have a 32mm notch that made work easier.