## 1 Introduction  
The primary goal of wastewater treatment plants (WWTPs) is to purify influent wastewater in accordance with specific requirements, followed by the discharge of treated water into bodies of water. Consequently, influent wastewater is regarded as waste, the harm of which must be mitigated, without considering the potential recovery of valuable resources that can be utilized in the economy. This has led to the overwhelming majority of WWTPs currently being used solely for the purpose of wastewater treatment and subsequent discharge, with the disposal of residual pollutants in landfills, while the recovery of secondary products (e.g., extracted nutrients for agricultural needs or treated sludge for various needs of economy) is often not taken into account. However, these approaches are gradually being reevaluated. In recent years, for example, there has been a significant increase in the prices of energy resources. This, in turn,affects the availability of produced fertilizers and, consequently, the cost of foodstuffs [1]. On the other hand, there is a growing concern due the uncontrolled increase in nutrient (nitrogen and phosphorus) emissions into the environment, the main reasons for which are the intensified use of fertilizers and the increased amount of wastewater production (especially in the case of their incomplete treatment) [2]. Efficient wastewater treatment may require increased costs, particularly when waste valorization is demanded. Therefore, technologies for treating wastewater sludge as a resource, which can produce valuable products, can be viewed as a promising direction for the development of green technologies, with a high potential for increasing the economic efficiency of wastewater treatment initiatives [3]. Inadequately treated sludge can become a source of soil contamination, particularly concerning pathogenic microorganisms and heavy metals. This is primarily attributed to the mixing of domestic, surface, and industrial wastewater [4]. The use of wastewater sludge in agriculture requires thorough scrutiny of the sludge composition due to the potential presence of toxic substances, heavy metals, and pharmaceutical compounds, which can significantly impact public health [5; 6]. The characteristics of sludge intended for treatment are directly influenced by the technological scheme employed in wastewater purification. Furthermore, the potential for utilizing sludge depends on its properties, highlighting the need for a comprehensive approach when designing wastewater treatment facilities to achieve the most effective production of secondary products. Improving the initial properties of sludge by adjusting certain key operations could significantly enhance the added value of the products generated. For example, the implementation of Enhanced Biological Phosphorus Removal (EBPR) during the biological treatment stage can increase the phosphorus recovery from wastewater into sludge by 5-7% of the total mass (compared with 2% with conventional technologies). This phosphorus-rich sludge can be utilized for agronomic purposes, as demonstrated by numerous studies [7; 8; 9]. Nutrient-rich sludge can be utilized in high-tech green production. For instance, there has been an increase in recent research related to the production of Polyhydroxyalkanoates (PHAs), commonly known as bioplastics. PHA is a polymer produced by bacteria that offers the advantages of being biodegradable and biocompatible [10]. Wastewater treatment sludge, particularly excess nutrient-rich activated sludge, can be considered a promising source of raw material for such production, as they contain a significant number of microorganisms that accumulate PHA as a reserve energy source. Research efforts are focused on identifying advanced extraction methods for PHA from biomass, which could substantially enhance the economic efficiency of the process [11].