Because you have a horizontal shaft engine mounted in a small area, you’ll have to remove the engine to access the stator. Before doing so I would make sure that a bad stator is the problem. You can get a service manual for your engine on this site. It will contain the electrical system testing procedure. https://www.mymowerparts.com/pdf/Kohler-Service-and-Repair-Manuals/