You will need to print the gears the best you can. That means not using fast speed and accelerations to have the most accurate shape for the gears. I printed them with 0.2mm layer height and I think I had to adjust the wall perimeter thickness to perfectly fit inside the teeth of the smaller gears.
The same way, it is very important where the start/end points of each wall perimeters are. Try to have them in the inner part of the teeth, not in the tip, if you are looking for the best gear performance.