I have a sf object which represents multiple bus routes in a city. I would like to simplify this sf object to remove the overlapping routes. The end result should be a sf object with a single line for each road where there is one (or more) bus routes.
I want to go from this...

to this...

I've tried various functions from the sf package and igraph. Using the underlying road network may facilitate finding a solution.
Here's the sample data that I would like to simplify:
library(sf)
lines <- st_sfc(list(st_linestring(rbind( c(0,0), c(5, 5), c(10,10) )),
st_linestring(rbind( c(0, 0), c(4, 5), c(10,9) )),
st_linestring(rbind( c(10,0), c(4,5), c(10,10) )),
st_linestring(rbind( c(0,10), c(5, 10), c(10,9) )),
st_linestring(rbind( c(0,9), c(5, 9), c(10,10) ))
))
road_network <- st_sfc(list(st_linestring(rbind( c(0, 0), c(2,3), c(4, 5), c(8,7), c(10,10) )),
st_linestring(rbind( c(10,0), c(7,2), c(4,5) )),
st_linestring(rbind( c(10,10), c(9,6), c(8, 5), c(10,0) )),
st_linestring(rbind( c(0,10), c(2,9), c(5, 10), c(8,9), c(10,10) ))))