Several biological and social contagion phenomena, such as superspreading events or social reinforcement, are the results of multi-body interactions, for which hypergraphs offer a natural mathematical description. In this paper, we develop a novel mathematical framework based on approximate master equations to study contagions on random hypergraphs with a heterogeneous structure, both in terms of group size (hyperedge cardinality) and of membership of nodes to groups (hyperdegree). The characterization of the inner dynamics of groups provides an accurate description of the contagion process, without losing the analytical tractability. Using a contagion model where multi-body interactions are mapped onto a nonlinear infection rate, our two main results show how large groups are influential, in the sense that they drive both the early spread of a contagion and its endemic state (i.e., its stationary state). First, we provide a detailed characterization of the phase transition, which can be continuous or discontinuous with a bistable regime, and derive analytical expressions for the critical and tricritical points. We find that large values of the third moment of the membership distribution suppress the emergence of a discontinuous phase transition. Furthermore, the combination of heterogeneous group sizes and nonlinear contagion facilitates the onset of a mesoscopic localization phase, where contagion is sustained only by the largest groups, thereby inhibiting bistability as well. Second, we formulate a simple problem of optimal seeding for hypergraph contagions to compare two strategies: tuning the allocation of seeds according to either node individual properties or according to group properties. We find that, when the contagion is sufficiently nonlinear, groups are more effective seeds of contagion than individual nodes.