First off, you need to define precisely what you mean by the "strength of impact" - depending on how you do this, you will get different answers. If you define it to be, say, the energy with which the object strikes, then of course it will be the energy that determines the strength, by definition. So we have to think a little bit about what that should "best" mean. Given that you are talking about "safety", then it stands to reason what you are after is damage - i.e. the damaging power of the impact. In that case, though, the damage depends just as much on the kind of object as on the impact itself - e.g. consider dropping a basketball versus a glass sculpture of the same mass.
That said, the most reasonable variable you will want to look at here is probably the force generated upon impact. This is because "damage", in this sense, occurs when materials are subject to forces that exceed certain strength limits, which in turn are set by the cohesive forces holding them together. In particular, denting (plastic damage) occurs when the elastic limit of the material is exceeded, and fracture (breaking into pieces) occurs when the ultimate strength is reached.
The force generated on impact is, per Newton's second law,
$$F = ma$$
related to the mass and rate of deceleration of the object. The deceleration rate, in turn, is related to the impact time $t_\mathrm{imp}$, which allows us to write this as:
$$F = It_\mathrm{imp}$$
with $I$ now the impulse, or change in momentum, delivered to the object. This will, for the case of hitting and stopping on a hard surface, equal in magnitude the object's original momentum.
So you would be tempted to say "momentum", but as you can also see, there is another factor, time, and that time depends in a complicated way upon other things like the object's velocity, the elasticity of the materials, and more and hence there isn't really any way to easily calculate it "from first principles" - you have to either do a full materials-physics simulation on a computer, or just measure the impact force empirically (usually the better and cheaper option).
Nonetheless, even with this, we can use intuition to make a rough idea that the apple will have the "worse" time, because while the needed momental change is much less, the much higher velocity means it has to stop a lot faster (a lot higher $t_\mathrm{imp}$). Indeed, from experience, we would "feel" that the apple will smash to bits. That said, depending on what your box is made of, it too could suffer damage since $30\ \mathrm{m/s}$ (= $30\ \mathrm{km/ks}$) is about highway speed.
Hence, the simplest answer would be "velocity, and the physical nature of the objects concerned".