Shifter cable running beneath the bottom bracket without a sheath I am trying to solve the neverending issue of my derailleur shifting on its own by replacing the shifter's cable and its sheath to see if it not sliding properly could be the cause of the issue.

Doing so I realized that both derailleurs' cables run beneath the bottom bracket in two rails, without any sheath wrapping them. In this picture, I removed the front cable (that was running in the left rail) while the rear derailleur cable is in place on the right rail.  



(yes I know the frame is very dirt, I just noticed. Never checked this thoughtfully down there).

I am wondering if this could be the issue of the friction, before installing the new stuff back. I noticed that that piece where the cables run into, can be replaced (though I don't know what to search for. By the way has that component a name?).
I am wondering this because the bicycle is quite old (it's a 2001 bike) and perhaps that has been superseded, and, most importantly, because I feel like I cannot lubricate those rails where a lot of friction must happen, because, being those so exposed, the grease down there would catch any kind of dirt and mud and probably make things worse.

Or maybe it's just fine as it is, with no lubrication at all, and I am totally seeking for the issue in the wrong spot. 
Any clarifications about that piece of gear would be immensely appreciated.

Thank you very much.
Ghost shifting is generally caused by the frame flexing, not by friction in the cables.
Other causes can be a poorly fitting or too short cable housing. Something is causing the length of the cable between the stops to change. 

Cleaning the cable run and using a teflon coated shift cable won't hurt and might alleviate the problem if it's a combo of bottom bracket flex and sticky guide. When this
is the cause the problem tends to be very intermittent and only occurs when standing
on the pedals to climb. However, as Daniel R Hicks suggests, check the frame carefully for cracks. An aluminum alloy frame of that age that has seen a lot of miles is at the end of it's usable life. 

If you can't find any cracks, examine the cable housing runs carefully. The cable housing ends should not move at all in the stops when shifting or turning the handlebars. Check the derailleur hanger to make sure it's not loose. 

The part you are looking at is called a Bottom Bracket Cable Guide, but your's looks
just fine. They rarely wear out, shift cables aren't under much tension, so a plastic slider is plenty slippery enough. On an old enough bike, they are made of metal.