Ditto on that--any secure container will slow them down by a minute or so, maybe more maybe less depending on how experienced they are and how good their tools are, and whether there are people around that actually care whether theives are stealing stuff off the bikes there. (some places they do, some they just stand and watch, or just ignore them).
If the parking place is very secure, and physically patrolled, and bike theft or vandalism doesn't occur there, then I suppose you could trust a security box/etc on teh frame to keep honest people out.
If theft or vandalism is common there, I wouldn't leave the bike there at all, even if it wasn't an ebike.