I have a program running on my Pi that needs to run in another household, without me coming to this household. The only thing needed is that the Pi is automatically connected to this household's WiFi without me coming to set this up. Is there any way to do this if I have the info of this other WiFi network?
Because you have the info about this other WiFi network it should not be a problem to pre configure the Raspberry Pi. Just edit
/etc/wpa_supplicant/wpa_supplicant.conf and modify its settings to the parameter you know from the other household.