Galaxy shapes in Magneticum. I. Connecting stellar and dark matter shapes to dynamical and morphological galaxy properties and the large-scale structure | Synapse