This test has been performed back in the days by someone flying a DJI Phantom 1 in Europe. It is done on a special firework testing field, and the persons along are certified pyrotechnics. Fire extinguishers were on place. The type of fireworks attached burns only straight down, those do not shoot anything in any direction & at the location there are no houses within kilometers. Never try this yourself.
Even if the video may look like someone is plain out "having fun", fun should be had other ways. This test may have been fun to try and beautiful to watch, but a few things were ensured:
-The fireworks attached are professional class, certified and of good quality
-Even in case of a fly-away (worst case); where even the CSC command would not work, they would have burned within 30 seconds, which was much less than the minimum time for the phantom to reach ANY buildings or humans beings, as this is in the countryside.
-Fire extinguishers where available
-Everything has been though-of in advance. The flight was tested initially without the flares lit.
-Once again and utterly importantly, there were no buildings or other humans around within a very big radius. Also no airports, railroads or main roads.