Excessive and insufficient lubrication can both cause problems.
Excessive amounts can allow it to run under gravity and migrate to areas where it shouldn't go. Places where it might become stuck and attract an accumulation of fouling, dirt & debris, which might in turn develop into a thick and nasty sludge, interfering with normal function (firing pin channel, around the frame parts & assemblies, inside the extractor recess, etc).
I've seen nasty accumulations gather around the sear, drawbar and other parts inside a frame and create functioning problems in guns. Another instructor brought me a relatively new (3-4 years old) 4566TSW in which the hammer wasn't consistently staying cocked during firing for the issued user. I disassembled the frame and found a surprising accumulation of slightly wet, sticky/tacky sludge that had gathered around the sear, preventing it from moving easily. This had apparently caused it to stick and not move fast enough to consistently catch the hammer's SA notches. (Nothing appeared to be wrong with the parts themselves.) Once clean (and NOT lubricated), the sear moved easily & normally, and the gun once again fired and operated normally. This was a user caused "problem" which had involved less-than-ideal cleaning & lubricating practices, which had allowed an excessive amount of solvent and/or lubrication to migrate around inside the frame.
Insufficient lube can also lead to problems, such as accelerated & excessive wear on the frame rails in the alloy frame guns. Slowed cycling, especially under the increasing heat of repeated firing.
When armorers do detailed inspections they can wipe down the various frame components, parts & assemblies with a lightly moistened patch, but this isn't the same thing as "oiling" the parts. Just wiping them down and then reassembling the gun. Aside from the bottom sides of the hammer, the rest of the frame parts & assemblies aren't normally "lubricated" when the guns are field-stripped for normal cleaning.
The use of one of the good quality synthetic greases made for use on firearms is also fine, as long it's applied according to the manufacturer's directions. Some of them are thicker and don't easily spread, and have to be put where you want them to be (fingers, Q-tips, other applicators, etc), and some are thinner and will spread a bit better. Read the directions.
I like some of the greases for conditions where the gun may be exposed to constant temperature changes and humidity (like near bodies of water), and they'll probably remain on the gun longer than some of the oils (which can have their carrier base evaporate, run off and thin under gravity or be wicked away by holster linings). Just depends.
I usually have 2-3 good synthetic greases and at least that many different synthetic oils that I use. Some make for easier cleaning after shooting, and some not so much.
Now, S&W 3rd gen armorers are given a pretty basic recommendation for lubrication. (For 'normal' conditions, although some different operating environments might necessitate something different.)
One (1) drop of oil on the barrel (especially at the muzzle)
One drop on the barrel hood (front of the hood, where it meets the front of the ejection port)
A drop each on the left & right rails of the slide (or frame). (I usually put 1-2 drops on the tops & sides of the front of the frame rails, where the slide rails will spread and carry it as I install the slide.)
On drop on each side of the hammer (at the bottom, where it rubs within the frame, but not so much that it will run off under gravity and migrate away from the hammer).
It's not a bad idea to rub some oil on the guide rod, too, and the oil remaining on your fingertips after rubbing it around the barrel/muzzle is probably enough to lubricate the guide rod.
The .45 frame rails aren't broken up into the same sort of shorter rail areas as on the of 9/.40 frames, so I usually use a bit more oil (or grease) on the .45's due to the added frame rail surface area.
I like to be able to see the frame rails exhibit some light degree of visible wetness (top & "upper" sides of the front & rear of the rails, and along the "lower" outside part of the rails). The places that can start to exhibit wear marks from cycling. If someone is having sluggish cycling or feeding stoppages on the firing line, and I fields-trip the pistol, I usually see dry rails. A couple drops of oil usually restores then gun to normal function in those sort of instances. (Another gun maker recommends their owners/users clean & lubricate the guns when new (before firing), after each time they're fired, or monthly (fired or not), whichever is applicable ... which ought to make sure the guns don't run dry, huh?

)
Now, the presence of lubrication can also act to help mitigate the vibration & shock which occurs during firing, helping to spare the metal from the vibration. (This was discovered by another company who makes allow-framed service pistols. I was forwarded a warning issued by one large agency using that company's weapons, and came across a wall poster in another agency using those weapons, on which someone had written in marker ink "lubricate your guns or die". Subtle, huh?
Just some rambling thoughts about lube. I'm not an expert. I don't shill or specifically push different oils & greases. The market has a bunch of good ones made for use on firearms. Pick whatever suits your fancy, and/or any specific conditions anticipated. Read the directions, though. (Hey, some folks still use old-fashioned Gun Oil from cleaning kits, or even 3-in-One Multi-Purpose Oil.

)