The symptoms described in the OP are typical of a new chain on an old(er) cassette, or an old chain on an old cassette which has reached 'end of life'. Given both are new, this is not the cause. And on 'normal' bikes this occurs first on the most used sprocket (eg 16t) in the middle of a cassette, not on the smallest sprocket (as here). Normally peak power (and therefore most likely slip) is not in the smallest sprocket (but on an e-bike, maybe this isn't true).
The OP might be spending a disproportionate amount of time in their smallest sprocket given the extra watts on tap. If that's the case (in flattish terrain perhaps) they might consider a larger chainring.
Cause of slipping in 'top' gear: 'fraid no further idea. OP might try asking this in the e-bike sub-forum as there will be knowledgeable chatters on there who don't come here.