Electrical faults that appear only after hours of operation can be difficult to identify.
"And then it's fine until it happens again a few days later." ...
If you bought an electric toaster oven from Amazon or Costco, you may want to check the make and model.