I had a friend who was killed by a motorist while walking on a country road, so I've given this some thought. The key principle for safety is to keep cars away from more vulnerable road users.
So, there are the same basic options: better public transport infrastructure, and well-signposted, properly maintained footpaths and bike lanes are the most obvious.
As for driving from the countryside into urban areas, you can have 'Park and ride' schemes, which are common in parts of the UK. You drive your car to a bus station at the edge of the town, and the bus takes you the rest of the way in. That minimises miles driven and keeps cars out of urban areas, where they're especially inefficient.