With Li-ion batteries, one must always be most careful, no question.
The "secret" that I have kept to myself, is to is to tell anyone who asks, that they should buy the best quality batteries....
I buy only Panasonic myself.
I think that in this kit that caught fire, they were most likely cheap no-name batteries.
Also maybe the lack (?) of a main fuse to blow, when over current is drawn, could have also be part of the problem....
As could a badly/wrongly set up controller!! Getting full details from Chinese companies selling controllers on ebay, is as a friend of mine said,as good as impossible!!!
There are many instances on YouTube of e-bikes catching fire....here are just a few:-
People can die, here 4 died:-