In the development of unconsolidated sandstone gas reservoirs, water and sand production pose challenges, reducing gas deliverability and causing reservoir damage. This paper presents a novel ternary water control and gas recovery technology using hydrophobic modification. The technology focuses on reversing capillary forces at the far-well edge of the reservoir to prevent water intrusion and creating a hydrophobic gravel layer around the wellbore to enhance water resistance. Additionally, the slotted liner cavities are treated to improve erosion resistance and maintain smooth gas flow, effectively controlling water and sand. The approach aims to minimize water and particle migration, thereby improving gas phase permeability. Researchers assessed the technology's effectiveness using a sand-gravel-slotted liner model and examined how sand wettability, gravel size, and liner slot width affect water resistance. Results show that the technology significantly reduces water phase permeability and gas sand content, increases water breakthrough pressure, and maintains the original permeability of the gas reservoir. When the formation sand contact angle θsand > 156°, the particle size ratio D50/d50 = 6.5, and the slit width is 0.30 mm, the water-resisting ability is the best. The research results can provide corresponding theoretical construction parameters for the field engineering of high-water cut-off loose sandstone gas reservoirs.