The low earth orbit (LEO) satellite Internet of Things (IoT) has attracted widespread attention as an effective complement to terrestrial IoT. However, given the large number of service terminals, it is essential to design an access scheme that satisfies high capacity and low latency. In this work, a non-orthogonal multiple access based enhanced frameless slotted ALOHA (NOMA-EFSA) scheme is proposed for the access of massive IoT terminals through a LEO satellite terrestrial relay network. In this scheme, terminals are categorized into free, backlogged, and pseudo-backlogged states. Terminals in different states transmit data packets at discrete power levels according to specific rules and the relay decodes them using inter-slot and intra-slot successive interference cancellation (SIC). Most importantly, an effect of imperfect channel state information (CSI) is considered, and signature codes are employed to mitigate the power collision in multi-terminal transmission within this scheme. The Markov chain is used to derive the lower bound of the system throughput and the upper bound of the number of backlogged terminals, while taking into account the performance loss caused by satellite link outage. Moreover, simulation results confirm the aforementioned analysis and show that the proposed scheme outperforms remarkably the existing enhanced frameless slotted ALOHA (EFSA) scheme in terms of throughput and the number of backlogged terminals.