At least mass-market phones and their batteries by reputable manufacturers go through rigorous testing. The sole exceptions I'm aware of are Samsung's infamous last-ever Note phablets and a few batches of iPhones. Fires of mechanically intact phones are rare.
Shoddy knockoffs and cheap Chinesium garbage however, that's a different thing.