It's an optimization problem which could be solved if impact of contrails could be estimated. Making a long detour unlikely is good choice but if a small route / altitude changes could help - why not?