We've struggled with this detail over the years, and come up with three different methods:
1. Buy or commandeer wheelchair hubs. They are specifically made for side loading. Spoke up a wheel with them.
2. Get a 1/2" Grade 8 hardened bolt. Take apart a 20" bike wheel bearing, take out all the guts, and drill it out carefully until the 1/2" bolt goes through. You can do this without destroying the axle on the right brand of wheel. Drill out the cones and other bearing guts so the bolt goes through them as well. Slip the 1/2" high strength bolt through the whole assembly including bearing cones. Then thread it through a hole machined into an aluminum block, with a nut on the other side. The aluminum block has to be on a vertical axle which we will "leave as an excercise for the student to design" as they say in the textbooks. Ride it around the block. Notice how the left side comes unscrewed. Now grind a slot in the bolt, and fashion a pin or cotter that can keep the nut from coming loose. Drill a hole in the nut for the cotter if that will make it not spin. Castle nuts might work too. Locktite won't cut it nor will nylon insert nuts or jam nuts. 1/2" hardened bolt may also work on an internal brake hub, which a friend successfully built. Hasn't broken the bolt in ten years of riding, although he's destroyed spokes and wheels. Don't forget to
3. You can use a rear hub motor with a heavy axle supported only on one side, if you clamp it hard so it can't rotate. This would be for a two-front-motor design. I'm working on a build like this now. Gets pretty complicated, probably not for the lighthearted.