Is it safe to drain the boiler immediately after use?

No, never attempt to drain the boiler when the machine is hot. Wait for it to cool down. Draining a hot boiler can result in scalding.