A good U lock for quick stops, and storing in a secure area overnight and at work does a lot to prevent most theft.
Additionally, renters/homeowners insurance. Just make sure it covers ebikes (some do not, like Travelers). Policies usually cover theft away from home.
Foldable bikes to bring in your home are also a solution if you do not have a safe place to secure your bike overnight.