Work done on a battery

Consider a battery of EMF $E$ and label its positive terminal $P$ and Negative terminal $N$.

Consider current flowing through the battery from $N$ to $P$. Then work is done by the battery. This makes sense because the electrostatic charge on the battery tries to oppose the current. So the battery needs to oppose that force for the current to go ahead and thus it does work.

But consider the opposite case. Current flows from $P$ to $N$ in the battery. Then we say work is done on the battery. Well, this statement doesn't seem intuitively right to me. What does it really mean for the work to be done on the battery? I mean the electrostatic charges are trying to support the current to go ahead. So why is work done on the battery?

My TA says it means charging the battery. But that doesn't give me a sense of satisfaction.

One way I imagine it is that we are doing the reverse of what we did first. So if in the first case work was done by the battery in the second case it will be done on the battery. Any other way to do that?

If the battery is designed to be rechargeable then the electrical energy entering the battery is converted to chemical potential energy and some heat.
The chemical reaction which produced the electrical energy when the battery was being discharged as the battery is doing work, is reversed.
So work by the external power source is done on the battery.
If there is no control mechanism then when the battery is fulled charged (no more conversion into chemical energy) then the energy is dissipated as heat.

Some batteries which are not designed to be recharged can, with care, be partially recharged.

During the normal operation of a battery, the chemical energy stored in the electrodes is partially converted, through chemical reactions, to the electrical energy. Naturally, the total chemical energy of the products of these reactions will be lower than the chemical energy of the original components.

Chemical reactions in batteries could be very complex, but, for the illustration purposes, they could be modeled as a redox reaction, which involves spontaneous exchange of electrons between participating materials, with some energy left to spare. The physical structure of a battery is such that these electrons are compelled to flow through an external circuit, giving up part of their energy to the load.

If the electrons are forced, by an external power source, to move in the opposite direction and if chemical reactions of a battery are reversible, such flow of electrons can potentially initiate a "reverse redox" reaction, resulting in the restoration of the original materials (electrodes) and the original chemical energy.

So, doing the work on the battery during the charging comes down to the restoring its electrodes and its chemical energy.

My TA says it means charging the battery. But that doesn't give me a sense of satisfaction.

First, if the electric current is into the more positive terminal of the cell (or battery), the circuit external to the cell is delivering power to the cell - there just isn't any way around that.

But, it isn't necessarily the case that all (or even some) of this power charges (stores energy) in the cell. For example, some of the power could go to heating the cell rather than reversing the chemical reactions that release stored chemical energy to the external circuit.

Still, keep in mind that every day, millions of running automobile engines spinning an alternator, drive an electric current into the positive terminal of a lead-acid battery in order to charge the battery, i.e., to store energy in the battery.