It’s your Facebook and you are allowed to customize what shows up on it and what conversations you have via your choice of friends.
My way is a little different; I hide all posts from a person whose views I cannot stand to see. But unfollowing would work just as well, I just don’t exercise it.
Your way isn’t wrong, just a little more black and white and more of a “clean cut” than the way I go about it.
I have a few friends that are excessively political for my tastes. They like sharing these things to my timeline. I zap them as soon as I see them. They clutter up my feed.