You are trying to use "iCloud Photos" like an external drive to extend the storage of your iPhone. But even fully optimized, your iCloud Photos will need some storage on your iPhone. As a rule of thumb, any item you are keeping in iCloud Photos will optimized need at least 10% to 20% of its original size on your iPhone. This is needed for the thumbnails and the database files describing the folders, adjustments, albums. metadata like faces and places.
With an iCloud Photos Library of 167GB, you are close to the limit how large you can let your Photos Library grow. If you try to let the iCloud Photos Library grow much larger beyond this, Photos will become painfully slow and you may encounter blank thumbnails, because Photos cannot even create thumbnails for browsing for all items in iCloud. The local storage on your device available for optimized versions is the bottleneck, determinining how large your iCloud Photos Library can grow.
When I still have been using my old iPhone 5s with just 64GB storage, my iCloud Photos Library with 200GB (at that time) needed fully optimized 25GB on the iPhone. Photos has still been responsive and still left me enough storage for the other apps and my music.
Like muguy recommended, keep the iCloud Photos Library small. I am only keeping my favorites and most important photos and the most recent new photos in iCloud Photos, only the photos I want to have with me at all times. On my Mac I am keeping several additional Photos Libraries, where I am archiving all my Photos, one Photos Library for each year, and one for each major event, like an extended vacation or photo safari. This way I can easily find older photos, if I need to look them up.
You do not necessarily need a Mac to archive your photos. Do you already have a computer with software to organize photos?