Absolutely, if there is enough plastic left, melting is one of the best options. That also enables mending plastic by melting in metal pins or strips via a cheap plastic welder for 10 bucks (success can be great, but it’s highly dependent on the geometry and how things broke).
Edit: no, as I said, that’s absolutely fine if there is a chunk of sturdy plastic to accept the insert. I just wanted to present another plastic repair technique for the sake of completeness, if somebody stumbles into this comment section.