I've used, and continue to use, a mess of different BMX handlebars. I've set up at least dozens of other folks with BMX bars to get them the best fit for whatever they were doing with their bikes.
MTB bars and most other upright bars have a 25.4mm center diameter. BMX bars have a 22.2mm center diameter. (They both have 22.2mm diameter grip sections.) You can get shims to take up the difference, but you'll have to use a stem that clamps the bar hard enough to keep it from slipping. It also has to be a faceplate type stem, because you can't slide the stem on from the end of the handlebar due to the crossbar.
Note that the BMX bar pattern is so inherently strong that it doesn't really matter whether it's CrMo steel, mild steel, or aluminum. The crossbar provides more stiffness and reinforcement than any material properties.
The main concern for a multispeed bike or e-bike is making sure you have enough straight section outside the bend of the bars to accommodate all the things you must mount there: brake levers, shifters, throttle, grips, bell, etc. BMX bikes only need enough room for grips; these days they often use specially bent brake levers that sit below the bend.
My favorite BMX bar for doing conversions of non-BMX bikes is
this one, which any bike shop can get for you from J&B Importers (a wholesale distributor).
The straight ends are actually longer than depicted in the photo. It's ordinary hi-tensile steel, but it only costs about $15 retail, and it's plenty strong. The real benefit to this bar is that there is no major bend in the grip section to interfere with the mounting of normal controls and accessories. The crossbar is a continuation of the grip sections-- so it's the right size to accommodate lights, bottle cages, cyclocomputers, GPS, clip-on aero bars, and whatever else that does not have to slide on from the bar end. This is by a wide margin the easiest BMX bar to make coexist with your other bike parts. It's referred to as "CW style", because the 1970s and '80s CW brand bar was mitered the same way, but the real vintage CW bars are too short on the ends for your application.
If you use the more usual bend of BMX bar with downward bends and a welded-in crossbar, you'll need a wider handlebar to have the same amount of room for mounting things. If you do decide you'd rather have something fancy/sexy/lightweight/heat-treated or whatever, I recommend measuring the stack of stuff (controls and grips, protuberances towards the inboard side) on your handlebars, taking the tape measure with you to a BMX-specific bike shop, and checking out your practicable options.
There are many motocross, ATV, and other motorcycle bars that also feature a reinforcing crossbar. But they are usually wider, much heavier, not as tall, and bent to provide a lot more pullback than BMX bars. I usually can't get them to set up worth a darn on a bicycle. There are exceptions, like my custom MTB that uses an ATV bar:
The scale of this bike is so big that the bars look sort of normal, but they are 31.5" wide.
Anyway, I don't generally recommend moto bars for bicycles unless you have an unusual fit issue.