No, killing an opponent's tokens in Ludo is not compulsory. But using this trick can definitely help you win the game.
‍