The thing about "resale value" pretty much goes with everything, not just ebikes:
Don't buy an item thinking it must keep value after time.
It's not a brick of gold you buy and leave stashed away for a rainy day.
Your return on investment will be on usage, the amount of true value and purpose it gives you.
If you buy a new window air conditioner for $200, used it for 5 years to stop you from dying, then you have amortized its costs of $40 a year to keep you alive from heat death, and can be discarded or resold for $25-50 whatever.
If you buy a new lawnmower for $200, used it to cut your lawn for 5 years, again, you got a beautiful maintained lawn at $40 a season.
The ebike will give you much joy and pleasure, things that are important in this post-pandemic era. When it comes time for you to upgrade and you need to get rid of your old one, it would be wrong to be upset how it lost so much monetary value. You "spent" that on you and your life and the fun you got out of it.