By what process is a third party device configured to connect to the WiFi network
It's different for different devices. Some use Bluetooth or NFC, but as you've observed that's not what's happening in your case. The most common alternative is that the device you're configuring can itself act as a Wi-Fi access point (AP): it creates its own Wi-Fi network. Your phone connects to the device's Wi-Fi network and sends it the connection details for the network you actually want, possibly via an HTTP request to a simple web server running on the device. After that, the device shuts down its Wi-Fi AP and connects to the Wi-Fi network you configured.

If there's a network problem, the device should start its own AP again to let you connect and give it some new connection details.