Taking your eBike to a Trek dealer may help in diagnosing a specific problem. Ie, Battery, charger, controller or motor. If it is the battery that has failed, the Trek dealer could help with a replacement or exchange. A replacement is not cheap ($1000+). They could also help you decide whether it’s worth a new battery.
Personally I would not consider a used or 3rd party battery replacement. Motor wear and tear could also be a factor. Is it worth it? The 2018 PF5 is a fairly good bike, but it’s almost 7 years old. Mileage matters and a knowledgeable buyer/user would need to consider that.
Batteries put the 'E' in e-bikes. But what do you do when you need a new one? We explore many common questions regarding electric bike batteries in this guide.
electricbikereport.com
With these e-bikes, a dead battery or motor can be a costly choice.