Advances in data science have relied on algorithms that extract actionable insights from large datasets. Hierarchical clustering reveals both horizontal and vertical relationships among data points. Current approaches emphasise graph-based similarity metrics, overlooking content features and their variations in many applications. A novel fairness parameter integrates explicit and implicit content descriptors with traditional similarity measures, assigning edge weights based on node content and producing first-level clusters with balanced content distribution. These clusters partition the content–structure graph; subsequent levels emerge through iterative graph updates and reapplication of the algorithm until a single root cluster forms. The method resists outliers and automatically determines the optimal number of clusters. Broad applicability across domains addresses interdisciplinary challenges. To validate performance, Wireless Sensor Networks (WSNs) were clustered using real-world voltage consumption data from Intel laboratory sensors. Hierarchical clustering achieved 99% accuracy in meeting study objectives. The algorithm yielded a Gini index of 0.9988, outperforming Density-Based Spatial Clustering of Applications with Noise (DBSCAN) and Pearson-based methods in both fairness and accuracy.