How can I replace 3D substructures - or join 3D fragments?

Is there a way to edit the 3D coordinates of a molecule by replacing an atom with a functional group (like a 3D template)?

I have some molecules which I want to convert from SMILES to 3D structures. However, hypervalent sulphur isn’t treated correctly by RDkit, so when generating or optimising 3D structures this results in “surplus” atoms being pushed away from the molecule.