I believe this could be used as a legitimate afk strategy but could be improved upon. I am open to suggestions for a location and will update accordingly.
As you can see from the clip, below, if you choose very specific settings in a custom match, it is easy to get kills.
I played as Dr. Toxic (who emits toxic damage to any Plant that gets near him) and played with the following settings:
1. Vanquish Confirmed
2. Chompers only on Plant Team
3. No Zombies on Zombie Team
4. Very Low Health
5. Super Speed
If you play on Vanquish Confirmed, the game has no time limit. The game will only end when one team collects 50 orbs from the other team. Thus, if you never collect any, you should never win (or lose) and the game will never end. The enemy Chompers will continually run to you trying to collect the orbs of their fallen teammates.
You should choose to play against Chompers only because Chompers have no "ranged" attack. Unfortunately, Chompers still have the "Goop" attack which can sometimes kill you.
You should play with no Zombies on the Zombie Team because there will be no Zombies to steal kills from you or to collect orbs. You can still choose whoever you want.
Very Low Health is crucial. The Chompers will only have 1 health which allows Dr. Toxic to kill the Chompers instantly whenever they get near. Even if the Chomper burrows and tries to eat you, the toxic cloud will kill the Chomper before his animation kills you, which will release you back to the ground.
I chose to use Super Speed to allow the Chompers to get back to you and the orbs quicker. This setting is not crucial.
It should look like this:
The afk method is not perfect, however. Occasionally the Chompers can shoot you with its "Goop" which will kill you. I found the Artic Chomper to be most deadly. If anyone has any suggestion as to a location where this is not possible, let me know and I will update the solution.