DearCustomer- I have copied the relevant statute below. I can understand why your neighbor is referring to this statute as it would appear that by building a fence you would be hindering his access. Based on my experience, the purpose of this law is to prevent someone from actually blocking another person's entry, not by building on their own property a legal structure.
If the proposed fence is legal and meets the zoning codes then I can't see that it would be violating this statute. Your neighbor can simply remove his planter box and provide his own access. It is not your responsibility to provide access, and in fact it also seems he would be trespassing if he has to come onto your property to remove his trash.
I believe the access is his problem, not yours. He is blocking the access by having the planter boxes. Until you build the fence tell him he is not permitted to come onto your property whatsoever to remove the trash. If he does you can file trespassing charges against him. That is a violation of law!
David Kennett - JD - Attorney at Law
420.1. Anyone who willfully and knowingly prevents, hinders, or
obstructs any person from entering, passing over, or leaving land in
which that person enjoys, either personally or as an agent, guest,
licensee, successor-in-interest, or contractor, a right to enter,
use, cross, or inspect the property pursuant to an easement,
covenant, license, profit, or other interest in the land, is guilty
of an infraction punishable by a fine not to exceed five hundred
dollars ($500), provided that the interest to be exercised has been
duly recorded with the county recorder's office. This section shall
not apply to the following persons: (1) any person engaged in lawful
labor union activities that are permitted to be carried out by state
or federal law; or (2) any person who is engaging in activities
protected by the California Constitution or the United States