Cover the lentils with water by about 2 inches. Simmer 20 to 25 minutes until tender but still holding their shape. Drain and season with salt.
Cook the rice according to the package directions. Cook the macaroni in salted water until al dente, then drain.
Fry the onions in the oil over medium heat, stirring often, for 15 to 20 minutes until deeply golden and crisp. Drain on paper towels and sprinkle with salt.
For the sauce, heat the olive oil and cook the garlic for 30 seconds. Add the tomatoes, vinegar, cumin, pepper flakes, and salt. Simmer 10 minutes.
Layer the rice, lentils, and macaroni in bowls. Add chickpeas if using. Top with tomato sauce and a generous handful of crispy onions.