Any chance one of the gears available on amazon with search terms "17 tooth module 1 gear" would work or could be modified to work?
Make or buy a gear cutter. Only cutters I found in module one were all PA20 or horological cutters (wrong tooth and space forms). Making a cutter is a fair bit of work as you are cutting steel, so a fly cutter isn't likely to work, although if you approximate the teeth with a slitting saw a fly cutter MAY work to refine the tooth flanks. I did this sort of silliness when restoring clocks as very old clock gearing rarely matches up to current cutter tooth forms.
You might double check the PA of 14.5 is correct, it's pretty rare in any modern application. PA20 is all over the place, 14.5 is just about unobtanium on the tooling and prefab gear side. Even AliExpress doesn't list M1 PA14.5 cutters. They do however have a LOT of m1 17t gears listed, perhaps your part is a standard industrial item in China and you can make the problem go away for just a few dollars. Aliexpress gear cutters seem to run around $20 or less for a single piece. If you do buy a cutter you'll need an arbor and to do some fiddling to get all set up, but you likely have been though all that in your head already.
Sort of like screw cutting for some folks, the whole gear cutting thing has gotten this mystique. If I said please cut 17 through slots on the periphery of this cylinder with a width of X and a depth of Y, you wouldn't consider that a hard job, just one that might be a pain if you need a slitting saw of a different thickness than is on hand. It would probably take longer deciding what to charge than it would to figure out how to do the work. Replace the slitting saw with a gear cutter and repeat the exercise. Congratulations, you're in the gear business. A gear form can be approximated with an end mill and then refined, even on a manual mill although it's a darn sight easier on a CNC machine as you can use ball end mills and do many passes without going bonkers keeping track of it all.
Why the gear failed seems worth asking. Some cordless tools do not leave much room for overstress. A dull chain, continuing to use the tool as the battery gets weak, a pinched and stuck bar, or just trying to tackle too large a branch or limb could cause lighter examples of cordless saws to fail. I love cordless tools for outdoor work, love the no gas and oil or dragging cord behind me, low noise, no stink, but when it's time to dice up something big out come the larger gas powered tools. My neighbor works his Rigid brand cordless tools from Home Depot pretty hard and they hold up, my Ryobi and Milwaukee cordless stuff has been really solid too. Doing it again in todays world sourced market I wouldn't spend the premium for Milwaukee, I'd be doing the Ryobi One series for most stuff and their 40 or higher volt stuff for outdoor equipment that expects hard use. Just takes a while to get used to having Zombie Green tools laying around
My neighbor uses a cordless demolition style saw with long blades for almost all of his heavier pruning needs rather than one of his chainsaws.
Cheers,
Stan