As someone in this industry (Ultimaker)
I will tell you. There no single printer you can buy that will do Lego level of quality. The precision of lego is just beyond of what current 3D print tech can do. The molds Lego uses to make their bricks are already on the extreme level.
Now, if you want to replace 1 brick. You most likely can get away with any printer, as 1 imprecise brick in a build isn't an issue. But 5 in a row are.
Your best bet would most likely be a small SLA printer. Like the a Formlabs or a Autodesk Amber.
If you don't want the dirty bits of SLA. You're stuck with an FDM printer. Not the best option for what you are looking for. But no chemicals. I would look at an option that has a 0.25mm nozzle option. There are a few. Our latest iteration has it. But that's most certainly not the cheapest machine.