Yes, but when you switch Slaking out of a battle, you have to spend the next turn either switching it back in or not using it, and both of these decrease its opportunities to be useful. In a pinch, Hariyama can sweep the opponent's entire team.
And does Slakoth really have a better type and ability compared to Makuhita?