Well you can do it if you have the money. They're slightly less efficient than a regular cassette and derailleur, but if you're not racing it probably doesn't make much difference.
The gravel sub-genre has spawned a few frames built for the Pinion drive gearing solution (located in the bottom breaker area, like a central ebike motor, started by car gearbox engineers). Arguably that could be considered the next level of hub gears.