I will soon buy a new iPhone. If I log in with my Apple ID in my new phone could I still access my Clash of Clans village without starting from scratch?
You'll want to use iTunes or iCloud to which to back up your iPhone prior to replacing it. For example, if you backup to iTunes and enable encryption, all your data and passwords will be covered as well as your apps. When you get the new phone, you would then immediately connect it to your system and use iTunes to restore your data to the new phone from backup.
As long as your backup and restore do not have any CoC action in between, your level information should transfer at par.