The novel coronavirus disease-2019 (COVID-19) has transformed into a global health concern, which resulted in human containment and isolation to flatten the curve of mortality rates of infected patients. To leverage the massive containment strategy, fifth-generation (5G)-envisioned unmanned aerial vehicles (UAVs) are used to minimize human intervention with the key benefits of ultra-low latency, high bandwidth, and reliability. This allows phased treatment of infected patients via threefold functionalities (3FFs) such as social distancing, proper sanitization, and inspection and monitoring. However, UAVs have to send massive recorded data back to ground stations (GS), which requires a real-time device connection density of 107/km2, which forms huge bottlenecks on 5G ecosystems. A sixth-generation (6G) ecosystem can provide terahertz (THz) frequency bands with massive short beamforming cells, intelligent deep connectivity, and physical- and link-level protocol virtualization. The UAVs form a swarm network to assure 3FFs which requires high-end computations and are data-intensive; thus, these computational tasks can be offloaded to nearby edge servers, which employ local federated learning to train the global models. It synchronizes the UAV task formations and optimizes the network functions. Task optimization of UAV swarms in 6G-assisted channels allows better management and ubiquitous and energy-efficient seamless communication over ground, space, and underwater channels. Thus, a data-centric 3FF approach is essential to fight against future pandemics, with a 6G backdrop channel. The proposed scheme is compared with traditional fourth-generation (4G) and 5G-networks-based schemes to indicate its efficiency in traffic density, processing latency, spectral efficiency, UAV mobility, radio loss, and device connection density.