I’ve not done any of those things, but I did use a old android phone for a timelapse project, one photo every 60 seconds, for about 15 months, and learnt a few things:
1) modern phone screens will burn the image into the pixels, after a month or two
2) phones and their software are not very reliable, uptime is poor, remote connectivity software (ssh servers) required rebooting regularly, apps freeze and crash when you dont want them to.
3) The phone battery got trashed in the process, we had ours powered the whole time.
4) notifications, system messages, sms, etc, can steal focus from your app, so remember to disable them.
I guess you could use a bluetooth trigger to take the pic if in range. Alternatively find/write a simple app to take a pic when triggered over wifi. Not really sure what there is you could solder unless you took the phone apart, which I really haven’t a clue about!