I am working on designing an embedded system that will support a touch screen and will communicate with a motor controller. This device, however needs to support firmware updates via a Wi-Fi module. 

The following are my specific questions:
Using an ESP266 has been effective in sending data to my server (Apache with MySQL database) but can this module be used to download firmware updates? (I've had a hard time finding anything on this.)
If not what would be a more effective module/approach?

What would a typical server setup look like for distributing firmware updates? Would it use TCP/IP or FTP? I don't imagine there would be more 10,000 of these devices distributed and the firmware itself would likely be >=50MB.

As far as flashing the firmware goes I was considering having a memory location dedicated to storing updated firmware and having the boot loader check if there is new firmware there. If there is it will begin flashing the new firmware. Whats a good method to ensure this is atomic? Is the bootloader the best place to do this or would something else be more appropriate?