That's a very elegant way of doing it! I need to do something similar with my setup one day. Having everything hosted in my home gives me the most control but also a lower availability than if I ran everything in someone else's datacenter. Currently an outage means that browsers and other clients just time out which is not very informative. Have you explored any other options? I was thinking of spinning up a dedicated VM somewhere to handle this and automatically switching over DNS entries at the same time (maybe automatically update DynDNS when the VM boots).
WRT is this relevant to selfhosted: I think some people will disagree, but Cloudflare is still selfhosting. It's not localhosting, but as long as it's services that you provision yourself it's selfhosting.