Well, yeah, but then it is quite unclear what "if button is pressed, enter the programming mode" means. The description goes about a simple bootloader that either boots a firmware, whatever it is, or "enters a programming mode" - which is, I believe, a built-in ROM bootloader in the programming mode. Note that OP mentions "OTA", but there is nothing really about OTA in the description.
OP, you do not describe your task well enough, apparently because you don't understand it well enough. You need to refine your description.