If anyone else having the same problem finds this: I solved the problem with Iconv by adding a LD FLAG before running the configure command, like this:
export LDFLAGS="-L/usr/local/opt/libiconv/lib"
./configure ...
Through this I was able to compile php 8.3.13 on Mac OS Ventura 13.7.