I don't think any reputable source would call this procedure safe, but it might possibly be used out of necessity in combat. Even if detonation doesn't occur through carbon sparks, there would still be residual fuel in seams,and in sediment, that would be released by heating to provide a later explosive environment. Also, why go to all this trouble if steaming or inert gas purging is available?
Not sure what you mean by "uncleaned container". You said it requires cleaning with soda or detergent, followed by rinsing with water. I would guess the detergent is enough to break up and remove any residual fuel. How much more does it need?