The documentation for publishing a SEDF as a feature layer says it is possible to overwrite an existing layer with over=True and giving layer details as optional arguments.
Documentation reference: https://developers.arcgis.com/python/api-reference/arcgis.features.toc.html?highlight=to_featurelayer#arcgis.features.GeoAccessor.to_featurelayer
when I try
sedf.spatial.to_featurelayer(overwrite=True, service={"featureServiceId" : featureServiceId, "layer": 0}
I get an error:
TypeError: to_featurelayer() got an unexpected keyword argument 'overwrite'
When I published the first version of the featurelayer using sedf.spatial.to_featurelayer(title="Title") - it worked