This is a difficult question to answer with anything other than "It depends." but I will give my criteria for choosing between alternative routes, and then the example of my typical commuting ride.
Criteria
I can't really speak to whether one or the other choice is empirically statistically safer. However, as a vehicular cyclist, I am most concerned about any time a motor vehicle and I are going to try and occupy the same space. Where the risk is highest in my experience is at intersections and driveways. At the same time road conditions and vehicle speed can make a huge difference in ability to avoid an accident. (I've never been hit by a car in over 70,000 miles of riding, but I have crashed because of road conditions, obstacles, or poor rider decision making many times.)
When choosing between routes, when all other factors are roughly equal (distance to destination, hills vs flat, etc), I prioritize, in order:
- Minimizing crossing and hooking encounters with cars, particularly at high speeds. So I avoid high-speed roads with lots of driveways or cross streets during peak traffic times (see my example below). It's the "intersection" and "drive-out" encounters that scare me the most. I've ridden thousands of miles on the shoulder of interstate highways with 65+ mph speed limits on weekends and early mornings and felt safer than riding in front of a shopping center or strip mall at 4:00 PM even if the speed limit is 25 mph.
- Look for lower speed limit and lower motor vehicle traffic routes if it's likely I will need to take the lane, either for safety, or in order to make a turn.
- Look for routes designated as bike routes, including signage and striping or other infrastructure.
Note: I actually in many cases will actively avoid designated bike routes and in particular separated bike paths because they tend to be poorly maintained, or are populated with pedestrians, skaters, and wrong-way bike riders. On-street bike lanes, when striped, tend to be in the "door-zone", and are often not any safer, or less safe even, than riding in a wide shoulder.
Real-Life Example
For almost a decade before the COVID-19 pandemic, my primary commute was a roughly 12 mile ride from a suburb of Salt Lake City, UT, to the downtown area. In my case, I would almost exclusively ride toward work in the morning on the very straight, direct and primary "State Street". This is a 3 lane each direction with central turn lane major thoroughfare that sees a ton of traffic. But in it's favor, it has HUGE shoulders for almost its entire length. So, at 5:30-5:45 AM when I would begin my commute:
- traffic was relatively light
- traffic signal priority was set in a way that at most intersections, unless a car was waiting on the cross street, I would encounter a green light
- there is very little residential property, so little overnight on-street parking
- most importantly, almost all of the businesses were closed, so there were few places where I had to worry about cars crossing my path or pulling into or out of parking lots.
That situation is entirely different at 4:00 PM when it is time to head home. So my route out of the city was usually a combination of "Main Street" or "West Temple Street", which are the two secondary streets parallel to my inbound route. Each of these streets:
- are 1-2 lanes each direction with a turn lane in-between for most of their length, and have a speed limit 10-15 mph lower than the parallel and primary State Street.
- are designated by the municipalities they cross as bike routes for at least part of each of their lengths, so there are painted lanes and share the road signs, etc.
- have more commercial/industrial zoning in places, rather than retail/commercial
- while there is more on-street parking, the traffic is lighter and lower speed, so "taking the lane" is a much more comfortable maneuver
The drawbacks of my afternoon route were:
- I encountered more stop signs and red lights, and traveled slightly out of my way. So the ride home was typically 15-20 minutes longer than the more direct ride to work.
- Much more on-street parking, so I have to watch the "door-zone", and be concerned about drive-outs. This leads me to taking the lane with some frequency.
- The primary State Street road saw much more frequent cleaning and resurfacing. So it was fast and smooth. The secondary streets tended to have more debris and road damage. The were typically "chip-sealed" every few years rather than resurfaced.