When is it the right time in terms to do the mapping? After how many miles can it be done? Is it preferable to wait for the engine “braking in”? What about engines which have been driven for many miles already?

There is no need technically speaking to wait for the braking in phase of the engine to perform an engine remap, but we still prefer to wait that the engine has been driven for 5 to 6000 Km (3-4000 miles). This allows you to measure real power/torque figures of the engine to start with. It also allows making sure that if an engine defect was present during engine build, there is strong likelihood that it would appear in that phase. For the engines that have a lot of mileage (above 200000 Km), we typically think that an engine remap is not justified as you could start seeing engine failures in some cases already.