Location: Lagos, Nigeria.
Nothing works perfectly.
Some things work better than others.
If you are serious you want a UPS or equivalent.
A transformer supply is less likely to die than a SMPS
If you want load "hold up" you want energy storage. This is usually in capacitors in a SMPS. Storing energy in capacitors for more than a brief blip requires vast capacitance - not realistically done.
Using an isolation transformer as a surge and spike suppressor has some merit.
Spike removal can use MOVs, gas discharge tubes, zeners and similar. Gas discharge tubes are the "gold standard".
Batteries are used to get holdup from tenths of a second through minutes + with a smps.
If budget is low a pretending "Ward Leonard machine" is a possibility.
WL is an AC motor driving a DC generator but you could drive an AC alternator with an AC motor. Hold up time depends on flywheel size.
You MAY be able to get an OK result with an unloaded induction motor running on the circuit storing energy mechanically and acting as an energy store. . More information is require in on power level required
may prove useful - he is using a petrol motor to power an alternator which is based on an induction motor but the principle is the same.
Mechanical storage in a flywheel or similar has the advantage of possibly being able to use surplus parts. How well that applies in Lagos I don't know.