I had a basement range in my previous house, I kinda miss it cuz my current house has no basement.
The house was built into a hillside so I had a basement garage, total distance available available inside the foundation was 70 feet. It was out in the sticks, so legal and neighbor issues were nil.
It was a one lane range, not commercial, so ventilation and powder buildup was never an issue, though my brother & I shot pretty extensively there.
The main issues were bullet trap. I used a commercial 1 sq. foot plate trap. In the event a bullet missed that, there was a 4 x 4 foot 6" thick oak wood boards backstop. We didn't let people use it who couldn't keep the shots in the plate trap
The trap limited us to .22s and .38 gallery loads.
Ventilation wasn't hard, the basement had casement windows set in dugouts below grade, We opened the ones down range and put big fans if front of them blowing air out of the basement. Refresh air leaked in through the garage, or you could crack the garage door.
The plate trap collected lead, lots of it... I eventually took to dumping the lead from the trap in the weight box of my tractor.
That about covers it, not hard with the right circumstances..... Impossible with the wrong circumstances.... (like NO basement...)
Oh.. and soundproofing so you couldn't hear it upstairs would probably be a fool's errand.... Would take LOTS if insulation... and still probably be heard.