Cranks are std ISIS splines so pretty much any crank tool should do the job
2017/2018 powerfly is Gen 2 CX line, so you need the park LRT-1 or equivalent tool for the sprocket retainer.
Make sure you fit the correct replacement sprocket, with the offset spacer and a new O ring too. Fit the wrong sprocket and it can spin and wreck the spines on the motor output shaft (ive just rebuild a gen2 with this exact problem. The SRAM X-SYNC E-MTB sprockets are ime the best ones, but a bit pricey, although they come with the correct spacer. Std will probably be a 15 tooth sprocket, a 16 tooth wil lfit with any of the covers, larger ones will need plastic removing from the covers to fit.
Also, seriously consider fitting a mudstop kit to help keep mud and water out. Many a gen2 has died because of the poor environmental sealing around the crankshaft…..