The two iCloud Photos storage settings options in
iOS > Settings > Photos are:
Optimize iPhone Storage
If your iPhone is low on space, full-resolution photos and videos are automatically replaced with smaller, device-sized version. Full-resolution versions can be downloaded from iCloud anytime.
Download and Keep Originals
This iPhone is currently storing original photos and videos. Turn on Optimize Storage to save device space and keep originals in iCloud.
The behavior I want for my iOS device is to save as many photos on-device as possible, but then to fall back to iCloud thumbnails + download on demand functionality when the device is getting close to full.
Is that what "Download and Keep Originals" does? Or does it fill the iPhone's device space? Does it prevent you from taking new photos if your iCloud library size is bigger than your phone storage size?
I have more than 1TB of iCloud photos, so the library will not fit on any iPhone sold by Apple. What is the behavior of "Download and Keep Originals" if the iCloud photo library is bigger than the iPhone device storage?
Does buying a 512GB or 1TB iPhone increase the cache that Photos uses when "Optimize iPhone Storage" is on? Or will Photos continue to only use a relatively small cache (~30GB) and "waste" the extra local storage space?