I did this to a base model alloy Mondraker but that was already out of warranty. That got nicked and I used the insurance money to buy a base model carbon Orbea Wild and I’ve changed everything bar frame and motor and electronics. Well, I have also changed the rim magnet to rotor but that was approved by Orbea. I have separate warranty on the other new components and as long as everything is in line with the manufacturer’s design as has been said, I can’t see an issue
As for the comment about ebikes just being about durability, disagree. I think the suspension needs to be decent to control the increased mass, on the drivetrain I changed the garbage that came on it for XT linkglide, so more durable. Which is true for just about everything I’ve changed, TBH. I now have the bike I want, and it’s mint. Shame I can’t ride it for a few months as injured, doh!