I recently found that the OsmAnd app lets you adjust the safety of your bike routes, so you can prefer safety over distance.
When navigating, click the “Ride Style” button and choose “prefer unpaved roads.” That name made me think it would find gravel/off-road trails, but it actually selects safer roads. In my experience this setting chooses the optimal routes–it’s finding the same general path that I would pick based on local knowledge, and it found improvements where I could take a slightly different street for a few blocks to avoid cars!
Also, OsmAnd~ is available via Fdroid with all the paywalls removed.
I wouldn’t recommend this option for inexperienced riders. Especially not on a city bike. I’m a somewhat advanced gravel rider and I switched this option off. To many times you can’t continue without a machete. I’m in Germany BTW.