Toffee was playing the long game. He wanted to destroy the Mewman's only trump card against Monsters by destroying their source of magic. Then he just wanted to get back at Queen Moon for defeating him.
His end game was to cripple the Mewmans and then destroy them. The reason that he hid inside of Ludo and persuaded Ludo to do his bidding rather than reveal himself outright is because he knew both Queen Moon and potentially Princess Butterfly had the ability to destroy him.
He took over Ludo's minions because, despite being a runt, Ludo was the most organized of the monster factions and knew how to be an effective leader despite being little more than a petulant child. He simply took what Ludo had.
Then he faked defeat against Star with the full knowledge that her whispering spell would cause him to disappear inside Ludo, which he needed to do in order to corrupt the Butterfly family's access to magic (and corrupt all magic for any of his adversaries).
Then he got Ludo to burn their book which meant that the Butterfly family didn't have its spells, family history, or Glossaryck to save them.
Where Toffee ultimately erred was taking Glossaryk's neutrality towards the Mewmans vs. Monsters conflict as a sign of complete apathy towards the entire affair. IIRC, in the Star vs. "lore," Glossaryk exists for the sole purpose of protecting and regulating magic in the Universe.
Toffee's ultimate sin was pride in thinking that he could out-maneuver Glossaryk, who is omnipotent for all intents and purposes.