IntroductionTuberculosis (TB) is a global health emergency and low treatment adherence among patients is a major barrier to ending the TB epidemic. The WHO promotes digital adherence technologies (DATs) as facilitators for improving treatment adherence in resource-limited settings. However, limited research has investigated whether DATs improve outcomes for high-risk patients (ie, those with a high probability of an unsuccessful outcome), leading to concerns that DATs may cause intervention-generated inequality.MethodsWe conducted secondary analyses of data from a completed individual-level randomised controlled trial in Nairobi, Kenya during 2016–2017, which evaluated the average intervention effect of a novel DAT-based behavioural support programme. We trained a causal forest model to answer three research questions: (1) Was the effect of the intervention heterogeneous across individuals? (2) Was the intervention less effective for high-risk patients? nd (3) Can differentiated care improve programme effectiveness and equity in treatment outcomes?ResultsWe found that individual intervention effects—the percentage point reduction in the likelihood of an unsuccessful treatment outcome—ranged from 4.2 to 12.4, with an average of 8.2. The intervention was beneficial for 76% of patients, and most beneficial for high-risk patients. Differentiated enrolment policies, targeted at high-risk patients, have the potential to (1) increase the average intervention effect of DAT services by up to 28.5% and (2) decrease the population average and standard deviation (across patients) of the probability of an unsuccessful treatment outcome by up to 8.5% and 31.5%, respectively.ConclusionThis DAT-based intervention can improve outcomes among high-risk patients, reducing inequity in the likelihood of an unsuccessful treatment outcome. In resource-limited settings where universal provision of the intervention is infeasible, targeting high-risk patients for DAT enrolment is a worthwhile strategy for programmes that involve human support sponsors, enabling them to achieve the highest possible impact for high-risk patients at a substantially improved cost-effectiveness ratio.