If your printer catches fire due to the electronics, it is very likely a write off by the time you have noticed, retrieved a suitable extinguisher and utilised it.
The fact that electrical safe fire extinguisher use gases or powder is unlikely going to help the parts burnt to a crisp. Worse, if a LASER is burnt or anything near it, that is not safe for other reasons.
In an ideal world something else sets the printer on fire, you notice it immediately, locate and operate a fire extinguisher, completing that task perfectly and expeditiously, then you have a degree of potential some of the printer can be salvaged.
However, as already stated, the likelihood is, it will be scraped and an insurance claim.