These scenarios are too simplified to be able to form an opinion.
But generally "unyielding barrier" will cause more damage.
Let's say the yielding barrier never breaks, only bends and moves one meter.
assume these factors just for the sake of a perspective.
$$F_{average}d= -\frac{1}{2}MV^2, \quad F_{average}=\frac{-\frac{1}{2}MV^2}{d}$$
Just by comparing
$V2/V1=1.2^2=1.44\ with\ d2/d1=3/2=1.5,$ we see any deflection larger than one meter of the yielding barrier will be less force to the car.
This is not even considering the deceleration which is greater in the first case.
- As to the part of the question hitting the subject a bit harder:
That is the game plan in martial arts or karate maneuver of breaking planks or concrete blocks safely by hitting fast. Obviously, they have practiced and learned from their master what to hit and what not to.
I would not try it on a car, even though I myself in sudden emerging black ice road conditions get very close to the car in front of me to minimize the potential impact.
Edit
I thought a short review of "hitting a bit harder to break an object could inflict less self-harm!"
Questin of impulse and hitting an object with the aim of destruction has been for centuries the subject of weaponry and armory (Andulosian swords) and using penetrating shells and resisting shields for eons. The War industry does a lot of experiments and research on alloys and speeds of shells but they keep their data well secret.
But theoretically at least in martial art, if one has a trained hand with calluses, with a strengthened skeletal-muscle system and they have the right material which will eventually break as opposed to deform. It is plausible to think if you just hit the target a bit harder to break it your hand will go through with carrying on the motion after a glance of shock and won't have to eat back all its impulse and break your bones.
Basically hitting hard and collision in the real world is a messy physics, half plastic, some elastic, a lot of heat, and in intense collisions cratering and a cascade of molten metal radiating out.