You are on the wrong forum to be asking about MTB's but i know a thing or two...
You get what you pay for.
Specialized are very good e-bikes, you really can't go wring there. Treks are good as well as all the Name brand bikes you see at real bike shops.
My friends have the $6,000-8,000 priced models and love them.
The similarities in all quality bikes are the motors. There are only a few who supply the motors, and the bike frame is specific to the manufacturer (Specialized or Trek), but the rest of the parts are 99% going to be from Shimano or Sram for drivetrain/brakes, and whoever for wheels, and Sram or Fox for suspension.
I assume by Trail Riding you mean dirt walking paths, or do you mean real mtb trails? If real trails, then look into getting a fatter tire (3.6 to 4 inches wide) vs the regular 2.6 that will come on most e-bikes. Bigger tire is less chance of flatting that 47lb bike, and more traction and comfort.
If you want to go the budget route then you can still get rear wheels that have the electric motor in them, and these will retro fit into any bike, or just buy the complete bike with that rear wheel.
For security, be careful, they can get stolen. Do not use braided cables to lock them. Use a manly heavy industrial chain and quality disc lock, or better to get a bike lock, like the NY lock, that has a guarantee to not get stolen even in NYC. More likely whatever it is locked to will be cut than the lock. Keep them inside and out of sight.
ABus or Kryptonite are quality brands found a a real bike shop or online.