There are some easy steps you can take at home to keep something like this from happening to you.
First, make sure the lint trap gets cleaned after each and every use. You should be able to see through the screen.
Once at month, at least, you may want to either vacuum the trap, or run a brush through it to get any lint that doesn't get stuck on the screen.
Keep an eye on the vents for your dryer, both in your home and the one leading out of your home. It's important to keep lint out of the vent that's on the back of your dryer, as well as keeping the outside vent clear of any debris (like leaves).
Judy Farrell is an owner of Home Zone Appliances. She herself had an experience where she was worried about an issue she was having with her dryer. "I realized it was very, very hot to the touch, so I had someone come out and he said I had lint caught in the back, and that's the reason it was getting hot on top, the heat couldn't get out," said Farrell. "You wanna unplug it, pull it out and detach the hose from the back of the dryer and then you can have a clear inspection."
She suggests checking the back hose whenever you can, as well as making sure the hose leading out is straight and does not have a kink in it.
All of these tips can prevent your dryer from overheating or any lint from building up.