Gravity train with the help of batteries? Imagine a gravity train (https://www.math.purdue.edu/~eremenko/train.html) that goes through Earth's crust from point A to B. The train could advance through the ride just by the force of gravity and halfway the trip it would be decelerated until reaching the destination at 0 speed.
However, this assumes that no friction exists. When we take it into account we would need,as the article that I linked says, a small engine to overcome the friction and reach our destination.
Couldn't we install some kind of system that would pick up the movement of the wind that would impact the train and the movement of the wheels when the train is pulled by gravity in the first half of the trip all the way until being almost stopped to power several batteries and when the train would be almost at speed 0, power the engine with the energy in the batteries to finally get to our destination?
 A: Re: charging a battery on the trip to overcome the friction.
No.
Friction will always oppose the direction of travel. So it slows the train on the way down, losing energy. And it slows the train on the way up, also losing energy. So the train loses energy to friction. The energy is presumably getting turned into heat, sound, mechanical changes in the wall, etc.
Now, consider some kind of windmill. The windmill cannot store any more energy than it takes from the wind. That is, this is still an energy conserving system. So the windmill converts some of the train's kinetic energy into (presumably) electrical energy. This slows the train down even more. The very best that could happen, with perfect efficiency, is that the electrical energy could be put back into kinetic energy for the train. That is, the windmill cannot do better than net-zero energy.
But consider that the winndmill will not operate perfectly efficiently. It will itself experience friction. It will have some kind of energy storage system which will not be perfectly efficient.  So the windmill will make things worse.
You may be being misled by regenerative braking as exists on some electric vehicles. These operate by using braking based on generating electricity from the braking. That is, the brakes are some kind of electric generator that charges some kind of battery. This is possibly useful for situations where you must brake even though you might prefer to continue. Traffic signals, traffic, and such. So you can get back some fraction of the energy in a situation where you are required to stop anyway. This only needs to be better than throwing away all of the energy in order to possibly be useful.
But your train does not want to stop. And doing anything to generate electrical power from the motion of the train will slow down the train. Or to store energy in any other form such as compressing a spring, etc. Any such scheme will make the train lose more energy overall on the trip.
In order to overcome friction in this situation you need to have an additional supply of energy in some form, and apply that to some kind of motor. So you might charge the battery before departure and use that during the trip. Or you might give the train an initial shove so that it starts out with an initial speed that supplies the energy to overcome friction. Or some other such process that provides the extra energy.
