In the ever-expanding Internet of Things (IoT) domain, the production of data has reached an unparalleled scale. This massive data is processed to glean invaluable insights, accelerating a myriad of decision-making processes. Nevertheless, the privacy and security of such information present formidable challenges. This study proposes an innovative methodology for resolving these challenges, by augmenting the privacy and efficacy of big data analytics through federated learning in the IoT ecosystem. The proffered approach amalgamates a hierarchical structure, a scalable learning rate, and a rudimentary cryptographic mechanism to foster learning while ensuring robust privacy and security. Additionally, we introduce a novel communication protocol -SEPP-IoT, designed to facilitate efficient, secure, and confidential interactions between IoT devices and a central server. In our pursuit of optimizing communication overhead, we propose an adaptive data compression algorithm, aimed at curbing the volume of data transferred between IoT devices and the central server. To fortify resilience and fault tolerance, our approach incorporates multiple mechanisms such as data replication, error correction codes, and proactive fault detection and recovery. Trust management, a salient feature of our framework, bolsters the security and integrity of federated learning. We recommend a unique technique that gauges the dependability of IoT nodes using four trust parameters. We employ the FedSim simulator to evaluate our method's effectiveness. The results indicate a notable enhancement in privacy and efficiency of big data analytics within the IoT.