The Narrowband Internet of Things (NB-IoT) is a very promising licensed Internet of things (IoT) technology for accommodating massive device connections in 5G and beyond. To enable network scalability, this study proposes a two-layers novel mixed approach that aims not only to create an efficient spectrum sharing among the many NB-IoT devices but also provides an energy-efficient network. On one layer, the approach uses an Adaptive Frequency Hopping Spread Spectrum (AFHSS) technique that uses a lightweight and secure pseudo-random sequence to exploit the channel diversity, to mitigate inter-link and cross-technology interference. On the second layer, the approach consists of a clustering and network coding (data aggregation) approach based on an energy-signal strength mixed gradient. The second layer contributes to offload the BS, allows for energy-efficient network scalability, helps balance the energy consumption of the network, and enhances the overall network lifetime. The proposed mixed strategy algorithm is modelled and simulated using the Matrix Laboratory (MATLAB) Long Term Evolution (LTE) toolbox. The obtained results reveal that the proposed mixed approach enhances network scalability while improving energy efficiency, transmission reliability, and network lifetime when compared to the existing spread spectrum only, nodes clustering only, and mixed approach with no network coding approaches.