It’s pretty hard to design a ditch or a pipe without knowing how much water it will carry. A ditch, even a small one, will carry a helluva lot more water than a pipe would, so piping may be less than effective.
One solution may be to grade out your ditch sides to flatter slopes. I like to keep side slopes to 3:1 so they are mowable. Flattening out the side grades will move the flowline away from the edge of the driveway, protecting the driveway better from the water, and protecting cars from the ditch. Undercut the ditch grades by about four inches, put in 4 inches of topsoil, and seed. That’s about the best erosion protection you can get. You can improve on this, particularly until the seed takes, by lining the ditch with jute or straw fabric. It comes in rolls, and some even has the grass seed in the fabric. It eventually rots away, leaving a well established turf. For really steep or high flow situations, they make a permanent turf reinforcement mat with plastic that kinda gives you reinforced grass.
The longitudinal ditch grade should be 2% or ¼ inch per foot drop minimum, or you’ll develop mini-wetlands where the ditch doesn’t drain. You can fix that, and dry up the ditch for minor rains, by putting a French Drain down the flowline. You can do the trenching with a ditchwitch, lay in perf pipe, and backfill with drainage gravel. The small flows will stay in the pipe, while greater flows will be carried by the ditch.