For reference, my Orbea Wild fs H25 was around 4.6k so within your budget.
It’s an incredibly capable bike.
I did put some Zeb Ultimates on it straight away though so the price certainly ended up on the fatter end of 5k.
If you end up being a 2-battery rider or don’t want to charge the battery in the bike or leave it in the cold, then bare that in mind when choosing a bike. Two batteries is usually a good day out.
The Whyte for instance is a pita to change the battery apparently. Read up on it in reviews.
The Trek is easier but still the battery cover bolts to the battery so if you want a quick change you’ll want to buy an additional battery cover which isn’t too cheap.
The Merida E160 is a great bike. Battery cover comes off with an Allen bolt I think.
Marin is a good one too. A mate has the bottom model.
My Orbea is dead easy. A twist lock bayonet thing and the cover pops off. A review or two said they’ve lost the cover riding. I added a little velcro strap around the downtube to avoid this. Keeps water out better too.