If a spacecraft is traveling at 4,000 m/s and it plows headlong into a planet, it has gained 4,000 m/s of delta v.
Delta v a measurement of a vector, not a scalar. The fact that its kinetic energy with respect to Earth is decreasing does not mean it isn't gaining delta v. In addition to the obvious (lowering your apogee) you can also use this delta v to change your inclination. It's not "free" of course- you need to do other engine burns to both put the craft into the atmosphere and then another burn to reestablish orbit once you're out the other side. But it isn't clear to me that this is less efficient than just doing the burns without the atmospheric assists.
> If a spacecraft is traveling at 4,000 m/s and it plows headlong into a planet, it has gained 4,000 m/s of delta v.
Yes and no. You've changed your velocity by 4km/s. You didn't gain usable ∆v, and you've just lost your spacecraft.
∆v means few related things. One, the amount of velocity change your mission plan requires. Second, the velocity change your craft is capable of using its own propulsion. Say you're plotting Mars orbit insertion. It requires (via [0]) 1.5 km/s ∆v. But you're a cheater, and decided to use aerobraking to bleed off (guessing a number) 1km/s of that velocity. This means you can complete this maneuver with a craft that only has 500m/s ∆v at the point of insertion. This does not mean the craft has gained ∆v.
Delta v a measurement of a vector, not a scalar. The fact that its kinetic energy with respect to Earth is decreasing does not mean it isn't gaining delta v. In addition to the obvious (lowering your apogee) you can also use this delta v to change your inclination. It's not "free" of course- you need to do other engine burns to both put the craft into the atmosphere and then another burn to reestablish orbit once you're out the other side. But it isn't clear to me that this is less efficient than just doing the burns without the atmospheric assists.