Front or rear is really a personal preference thing. Lots and lots of discussion on that in the past. Both have advantages and disadvantages.
Simply put, I prefer front hub on asphalt and rear hub on dirt, so a bike for both often means a rear hub.
Carrying a battery on a rear hub bike is best done in the frame triangle. On many full suspension bikes, what frame triangle space? So if the battery is rear, it can balance the bike better to put the motor up front. One rear hub bike I built was a real wheeliemobile, and that was with 1/2 the battery in the frame.. Kinda fun, but too sketchy to ride much on it that way. But a rear hub is not so big a problem with smaller batteries. You though, want to go a long way.
Front hubs MUST be installed on steel forks, and even many steel forks are not strong enough. Oddly the cheap ones tend to be the strong ones. Good stuff is made light. Front hub on alloy suspension forks is not for a novice to install. Screw up and put your dental surgeons kids through colledge. Don't forget, you have no insurance when you crash. ( ok if lucky, you have a dental plan and only pay for one kid to go to colledge. ) For this reason, some will never consider a front hub.
Some people absolutely piss themselves if a wheel spins. They may piss and crap themselves if a front wheel starts to spin. Me, I just adjust, Ok today I get lots of wheel spin cuz it rained last night. No biggie for me with 45 years of experience riding two wheeled stuff. Drift the front wheel, drift the rear wheel, whatever.
Repeating one more time, your desire is not an ebike, but a motorcycle. Having it insured and licenced will be worth the cost, but the cost will be 5-10 thou. Nothing wrong with gaining experience cheap though, by building a more ordinary 30 mph ebike.