An Apex trigger is proposed to count the number of related contact records for an account to populate a field, since a rollup summary field cannot be used due to the lookup relationship between account and contact. The trigger would need to execute on contact record insert, update, and delete to accurately update the account field, as a process builder would fail to handle deletions. The target object for the trigger would be the account, and the trigger events would be on contact record changes.