Not unless you have either a scoop on the front to gather a large amount of air into it to "ram" air in, or something similar on the back to do the same. If you restrict the airflow *and* force it to go around bends like that, using small hose or pipe, it's just not going to move much air.
You might not *need* much, but that you would have to determine by experimentation.
If you can do it, using either the direct heatsink method (to the outside of the case) or using the louvred hole approach would probably work best. The first is completely waterproof, and the second is at least rainproof, though not splashproof. If you have fenders on the wheel(s) then it might not matter.
Oh, and I'd forgotten about this, but for security of my lighting battery pack, tools, etc on one version of my upright bike, I'd just bolted a cat-litter pail sideways to a homemade rear rack (could have used a standard one if it was available), and just used hasps and padlocks on each side of the snap-down watertight lid. It was the cheapest way to make a watertight and secure container that people probably wouldn't want to steal, since it's just a cat litter pail.
I thought about buying hard cases like some of the ones made for motorcycles and scooters, because they're more aerodynamic and look better, but even if I had had the money for them, they were expensive-looking and would have themselves been a target for theft, whereas a cat litter pail generally is not.
For some more aerodynamic and cool-looking yet still made-from-junk lockable pods, I acquired but never used a couple of dead vacuum cleaners. There's a whole post about that here, if you're interested in the idea. I probably will use them someday, for a minimalist bike just for commuting with no real cargo, just a change of clothes for work and whatnot, plus the controller, batteries, tools, etc. I don't think anyone would steal these, either.
Cargo Pods That Don't Suck Anymore