In the second video, as the ball rolls down the cart, it is exerting a force that would attempt to push the cart backwards. This force is too small to turn the wheels because whatever bearings they are attached with are not perfect. Thus the force is communicated from the ball to the cart to the bearings to the wheels and then to the Earth, meaning that this does not violate conservation of momentum. When the ball hits the end of the cart, it transfers all of its kinetic energy to the cart in a very small distance, resulting in a large force that is sufficient to turn the wheels. There is nothing very special about what we are seeing here, it is not violating the laws of physics, the ultimate source of the cart's momentum is friction between its wheels and the Earth, the same as would be the case if it were driven by a motor; this is just a very poor way of accomplishing it.
I am not entirely sure what the guy doing the demonstration thought he was proving when he exchanged the ball rolling down with the swinging pendulum. The reason the cart goes farther in that case is because rather than a sharp shock when the ball hits the bottom, there is a more gradual exchange of energy, so less is lost to heat and vibrations in the cart.
The demonstrations in the first video are slightly more complex because the pendulum is driven with a motor, but the principle is the same. If it really were possible to perfectly lubricate the surface so that there is zero friction, the cart wouldn't move. I suspect that the reason the wind up truck spins out of control whereas the pendulum cart doesn't is just because the truck has much more power going to its wheels... due to the fact that turning the wheels of a vehicle directly is a much more efficient way of moving than swinging pendulums around the place.
It is also quite possible that they just cheat by making it so the wheels can't turn backwards.