In Thor, Odin was able to remove Thor's powers with an incantation.
Why didn't he do this with Hela, or for that matter Loki in the second film?
Odin didn't remove Thor's power. He removed Thor's ability to channel his power through Mjolnir.
In the original Thor, Odin simply removes the hammer from Thor's hand. He then puts an enchantment on it that only the "worthy" can wield the hammer. Thor does not know that he can use his power without the hammer as evident his conversation with Odin in Thor: Ragnorak.
Thor: She's too strong. Without my hammer, I can't....
Odin: Are you Thor, the God of Hammers? That hammer was to help you control your power, to focus it. It was never your source of strength.
As such, there does not seem to be any evidence that Odin can actually remove innate power. It simply would not work on Loki or Hela as they both seem to have figured out how to use their powers without a tool.
Odin,. Thor and Hela all draw their strength from Asgard. That's why Odin couldn't take hela's power because he lost his power when Loki took him to earth. He had banished her but by him not being on Asgard anymore her banishment wore off and she escaped her exile.