Our butternut tree does that. It will produce like crazy, and then minimum production for a couple of years, and then another good year.
Papaya are not really trees, just very big plants. They produce heavily until they reach about 10 feet high. Then I cut the whole plant off at about 3 feet off the ground and wrap the trunk in black Plastic. The roots will send up several shoots. I leave the strongest one and remove the others. The plant then bears heavily for a again for a couple of years