Two good torque arms will handle a 40 mph motor, which is typically a 72v 40 amps setup. They do have to be good, with nice tight fit on the arm to the axle itself. Typically, you do have to deepen the 10 mm dropout to 12 mm, so the brake disk still centers perfect.
RE the bike itself, of course you ride what you can afford. My bikes were based on the cheapest used FS mtb's I could find. Good frames that did not wear out. But antiquated Y frames meant no place to carry batteries ideally.
The main thing is once you get it built, limit yourself to what it can handle safe. If you get wobble, your frame is not stiff enough. And aluminum frames will soften if they wobble enough, and wear out fast.
The territory you are heading into calls for learning to weld, with a very cheap wire feed welder. Then you can take a cheap frame, and rebuild it stiff enough for your power cravings. Lengthen it for more stability at speed, and in corners. But for now, just find out what your bikes safe speeds are, and stay within that. Bike might be able to do 40, but cruise at a safer 30 mph might be the thing to do.