Sewer monitoring is a very relevant and current topic, also supporting management and maintenance activities, with interventions aimed at reducing the impacts on receiving water bodies as much as possible. Moreover, wastewater monitoring is crucial also for epidemiological purpose with the diffusion of the wastewater-based epidemiology (WBE), as emerged during the Covid pandemic for individuating the virus presence on a community-level. The planning of monitoring systems, allowing for the identification of the number of sensors and their positioning in the network, have been delegated for a long time to the judgment of expert technicians, sometimes resorting to trial-and-error strategies. Only recently, the impellent need for controlling such systems, mainly with respect to the presence of illicit spills and the spread of epidemics, have fostered the proposal of further increasingly efficient monitoring strategies with contained computational effort. In this perspective, the present paper proposes a novel two-step strategy for the optimal design of monitoring system in sewer systems. The first step aims at reducing the system's search space using a relevance-based topological metric, which provides a ranking of the most suitable nodes to host sensors. The second step acts on the reduced search space through an optimization procedure aiming at searching for the best location of a fixed number of sensors, with specific threshold value, in order to maximize the reliability of the monitoring system in detecting target substances or contaminant. The results demonstrate that shrinking the search space considerably reduces the computational times providing very reliable solutions.