To respond to pandemics such as COVID-19, policy makers have relied on interventions that target specific population groups or activities. Such targeting is potentially contentious, so rigorously quantifying its benefits and downsides is critical for designing effective and equitable pandemic control policies. We propose a flexible modeling framework and a set of associated algorithms that compute optimally targeted, time-dependent interventions that coordinate across two dimensions of heterogeneity: population group characteristics and the specific activities that individuals engage in during the normal course of a day. We showcase a complete implementation in a case study focused on the Île-de-France region of France, based on commonly available hospitalization, community mobility, social contacts and economic data. We find that optimized dual-targeted policies have a simple and explainable structure, imposing less confinement on group-activity pairs that generate a relatively high economic value prorated by activity-specific social contacts. When compared to confinements based on uniform or less granular targeting, dual-targeted policies generate substantial complementarities that lead to Pareto improvements, reducing the number of deaths and the economic losses overall and reducing the time in confinement foreach population group. Since dual-targeted policies could lead to increased discrepancies in the confinements faced by distinct groups, we also quantify the impact of requirements that explicitly limit such disparities, and find that satisfactory intermediate trade-offs may be achievable through limited targeting.