In general cameras do use darker materials to construct light boxes and the interior surfaces of lenses. Many also use materials, such as the flocking material found on the inner surface of higher end lens hoods or plastic that is molded with a textured surface, that scatter what little light is reflected.
Even when using a camera with a full frame sensor a significant portion of the image circle projected by a full frame lens falls on areas outside of the rectangular imaging sensor. The light is either absorbed by the materials/coating of the areas it strikes or is reflected. With materials that scatter the reflected light the portion that may wind up falling on the sensor is so diffused and evenly spread out that it will normally not affect the image captured by the sensor in any meaningful way.
It will be much like what happens when we take a long exposure photo and people who cross the field of view are not visible in the image recorded. The minimal light their presence cast on the sensor for a few short moments is overpowered by the light from the same areas of the scene behind where they moved that shone on the sensor for all of the exposure except those fleeting moments.
Remember, the light going directly through the lens and striking the sensor directly will almost always be proportionally brighter that diffused reflections of the light from the edges of the image circle.
There are cases where extension tubes, telescope adapters, etc. are not coated with dark, light scattering materials. Sometimes they do cause reflections that wind up in the final image. This is most often the case if the overall scene is very dark but there are small, very bright light sources in the scene.
The ring on Jupiter was likely caused by a T-mount adapter with a shiny interior between a telescope and camera:
