Apps are not "written for X11" today. They're written in some toolkit library, like Qt, GTK+, and the toolkit arranges the rendering (possibly via another library). Apps in the future will continue to be written to use toolkits. So "if the app is written for Wayland" is just a straw-man.
Apps in the future will continue, overwhelmingly, to be written to one of a small number of toolkits. At least some of these toolkits, including the 2 most popular, *already* support multiple rendering outputs (from X11, to Windows, to direct framebuffers, even to HTML!). Hell, they *already* support Wayland!
Your fear is unfounded. You can relax, your apps will, overwhelmingly, continue to work with X11, Wayland, whatever, without you or your apps having to care. X11 will continue to work, even if fewer people use it.