The most important thing is: get an ebike. Then you have an ebike.
Proprietary bullshit is the rule not the exception. You can always trade your bike if you're getting pissed off with it. Just make sure you keep up with maitenance, and it should be reliable. I use Bosch stuff on my bike, and I've made peace with it - it works fine, and I can get any replacement parts I need on eBay, and the local shop can service the electronics.
These e-bikes feature the non-proprietary generic batteries and hub motors that increase repairability and don't keep you forced to an ecosystem that you're not sure will have replacements in 5 years.
There's a balancing act here, since generic equipment on your bike will be attractive to bike thieves. The integrated battery definately helps with that... but it's annoying in other ways, and in any case thieves will prioritize taking the entire bike. Maitenance is a risk, especially since we've seen some manufacturers fail and then parts becoming difficult to find. But I think if you're handy and keep up with maitenance, you may find that your bike just keeps on working well beyond that 5 year mark. The battery does get affected by cycle time, but modern battery chemistry is pretty good, so there are a lot of old batteries out there that still have 85%+ of of their capacity even after a couple of thousand cycles.
I lock up my bike outside for several hours at a time most weeks. Having a decent lock, and then just making sure it's not locked up in a dark alley overnight has kept it safe so far. But I accept that my ebike might get stolen someday, and try not to let it prevent me from using it.
