We usually use "of" for possession to speak of more important things or things that stand out in some way. Also, though we are charging a battery, people mostly think of charging their cell-phones, not the battery.
I do not recommend using your first example sentence. It's not a good idea.
Student or Learner