I am very late to the party, but I wonder if this could work: https://rdrr.io/cran/spatialEco/man/sf_dissolve.html
I am not sure whether this dissolving by features can be implemented with sf functions, happy to learn from more experienced people around :)