Cover the chickpeas, kidney beans and butter beans with water and soak overnight. Next day, drain and transfer to a large saucepan, then cover with fresh water and bring to the boil. Reduce the heat to low and simmer, covered, for 30 minutes. Add the lentils, rice (if using), burghul, potato and enough water to cover.
Heat the oil in a frying pan over medium heat and cook the onion for 5 minutes or until golden brown. Add the onion and oil to the bean mixture, then stir in the salt and ensure the mixture is still covered with water (top up if necessary). Cover and simmer over low heat for about 90 minutes. The soup will be thick – add water if a thinner consistency is preferred. Serve immediately, scattered with flat-leaf parsley or store covered in the refrigerator and eat within a few days.