The following comes from my knowledge of physics, including tensions, angles, and leverages. I don't know what is safest or builds more muscle, but I do know how much force each muscle is getting:
The difference between dumbbells and bench press is dumbbells allow you to take the triceps out of the picture, and hold the bar how you want. As long as your forearms point straight up, it is just a chest/shoulder workout. The more your elbows are flared out at 90 degrees to your body, the more you work your chest, and the less you work your front deltoids. The more you tuck your shoulders to your body (closer to your stomach you bring the weights), the more you work your front deltoids, and less you work your chest. If you do a wide flye, with your forearms leaning outwards or towards your belly, you will work your biceps too. If you do a close flye, with your forearms leaning inwards or towards your head, you will work your triceps.
Dumbbells let you hold the bars in a way that is comfortable for your wrists. Barbells injure my wrists. Dumbbells also let you twist the bars as you raise them. I don't know if that is safer or just builds muscle better, but you can't do it with a barbell. When your forearms are straight up, you can isolate the chest with dumbbells. Compound lifts let you load more muscles at once so you make more growth hormone, but they leave you wondering which muscle group failed first. If you are like me and can't grow from too many sets, doing 3 extra sets too take that muscle group to failure could result in no growth, whereas not isolating it could result in it not getting worked enough. I like dumbbell flyes because I can separate chest and triceps and know that both got their ideal amount of work. I try to get my growth hormone from HIIT.
The ideal grip to bring the chest and triceps to failure at the same time is complicated, and depends on the level of development of both. If you grip is closer together than your shoulders at the bottom, then the chest is not used at all at the bottom.