To your first question, balena WiFi Connect is designed to do exactly what you are asking for. Upon startup it will try to connect to one of the known networks. If it can’t, it will create the AP to allow you connect and access the captive portal to configure a new access to the visible networks. This way, if no known network is visible, you should be able to see in your phone (or any other device nearby) a WiFi SSID with the WiFI Connect AP.
For making it start after boot, you will have to configure it as a linux service, and linux will take care of it. Try using this instructions and see if you can get it to work: https://linuxconfig.org/how-to-automatically-execute-shell-script-at-startup-boot-on-systemd-linux