Yes.
The violence visited on the Hebrews was punishment for their rebellion against God.
Would that be a loving god?
Yes. What would happen if you let your children run wild?
Violence would be the morally incorrect solution.
That was man's" solution " to the baby Jesus after the wise men / God's people approached Herod.
Love personified came into the world.
King Herod and all Jerusalem were troubled.
Herod murdered all of the toddlers and infants.
Guess what?