yes, if the crankshaft bearings are worn, the flywheel magnets may touch the stator (the stator is within the magnets and bolted to the engine block).
Although the clearance between the magnets and the stator is minimal, the bearings must be severely damaged before there can be actual contact.
I dunno what to tell you.. you are sure the crankshaft moves sideways.. bearings are the only thing stopping it from doing so.
Repair involves splitting the engine case open, removing the crankshaft and replacing the bearings and seals and gaskets.. Accuracy when reassembling is critical. Clearances must be observed.. Not too difficult to do and it doesn't require a bunch of tools, but it's not a job for the faint of heart..
You won't be the first person to go into the crankcase and discover that not only are the main bearings shot, the connecting rod big end is also shot, probably due to insufficient lubrication.. Check it out before make any decisions.