As long as your iPhone Photos Library is set up to sync with iCloud Photos, any photo you delete from your iPhone will also be deleted from iCloud and all other of your devices that are syncing with iCloud Photos. Just remember, that the main purpose of iCloud Photos is to keep the photos Library in iCloud in sync with all your devices to keep the libraries identical everywhere.
Fotr all purposes you could assume, that your iCloud Photos Library is stored only once, in iCloud and your devices are holding local shadow copies of the library in iCloud. The local shadow copies are the handles, so we can work with the items in iCloud. Anything we are doing with our photos on one device will be synced to iCloud and update the library there, then synced to your other devices. 
keep only the items in iCloud Photos that you want to have on all of your devices. Your device with the least storage will be the bottleneck. Don't let the Photos Library in iCloud grow larger than will fit well onto your iPhone. 
The optimize Storage option is the only way to save storage when using iCloud Photos. It is fully automatic. iCloud will remove originals when the storage is getting low. Don't delete any photo that you want to keep in iCloud.