Might be your issue. Does it have a jam nut on the backside? Is the switch in the grounding circuit for current flow to the battery or maybe I should say, is the switch mounted to metal or plastic?
Additionally, most V twin and single cylinder gas motors used in equipment like yours have basically a solid state alternator. The flywheel has magnets in the outer diameter that excite a stationary coil that is mounted to the block under the flywheel that produce charging current and other than a magnet coming loose (they are usually epoxied to the flywheel), they are pretty much maintenance free.