So yes, the same aperture on two lenses of different lengths would allow a different amount of light to reach the surface where the image is being recorded (sensor/film plane).
For same aperture diameter, yes. For the same fstop number, no.
The focal length factor is not about the path length in the lens. It is about magnification of the field of view. Illumination per unit of area.
A short lens (wide angle) gathers a lot of light from a very wide view, and concentrates all of it onto the camera sensor area.
A long lens (telephoto) gathers much less light from a much smaller view, onto same sensor area. Less light collected from a smaller area.
But fstop = focal length / aperture diameter equalizes these, giving constant exposure at equal fstops. That's why we bother with fstop numbers.
At f/4, a 200 mm lens has aperture diameter 200/4 = 50mm diameter.
At f/4, a 50 mm lens has aperture diameter 50/4 = 12.5 mm diameter.
Exposure depends on the Area of that aperture. Area of a circle is Pi r squared. One stop is 2x light, and 2x area is 2 Pi r squared. This makes 2x exposure of next fstop number increment be a factor of square root of 2 (of the fstop number itself).
But for both lens to be equal f/4 exposure, the 200mm lens has an aperture diameter 4x greater than the 50 mm lens.
And the SAME fstop number.
Photographic Tables, Aperture f/stop, Shutter Speed, ISO and EV goes into these details.