Hello and welcome to healthcare forum.
is a healthy practice and can not be considered as bad habit. It has no harm to body, sexual life or fertility
. Movement of penis that occurs in vagina during sex, same movement occurs in fist during masturbation.
I hope i have answered your query.