Yes hydrogen peroxide is safe to use on your gums.
You can also use hydrogen peroxide to gargle with and it will help tooth infections, swollen gums etc.
The hydrogen peroxide also helps to kill bacteria in your mouth and keeps your gums and teeth healthy.
When you have a sore in your mouth such as a mouth ulcer you can gargle with the hydrogen peroxide and it will help get rid of the mouth ulcer.
You can also use apple cider vinegar as a natural mouthwash and it too will help with mouth ulcers and help your gums heal as well as kill bacteria in your mouth.
Hydrogen peroxide is safe to use in your mouth and on your gums as long as you do not swallow the hydrogen peroxide.