There's various feats that add to demoralize, and the DC is usually fairly low. However, investing in it properly is a matter of considerable feats and even potentially class levels. A good standby in this situation (or any optimizing situation) is to look at what you'd be doing otherwise, compare the two, and decide which you like better.
I'd personally go with Demoralizing because as a melee character having as many mechanical things to do in combat as you can is always good - attack attack attack gets boring over 20 levels.
That said, after briefly looking at the options, Demoralize appears to be a genuinely useful thing to be doing, with the right feats and class options.
Using demoralize on the same creature only extends the duration; it does not create a stronger fear condition.
This is where I start to get interested. Not because being Shaken for longer is great, but because of this ability I found when I searched for 'is demoralize any good pathfinder'.
Whenever a thug successfully uses Intimidate to demoralize a creature, the duration of the shaken condition is increased by 1 round. In addition, if the target is shaken for 4 or more rounds, the thug can instead decide to make the target frightened for 1 round.
That's for the Thug rogue character archetype, and it receives it at first level. Let's take a look at what Frightened does for us in terms of mechanical effect.
Frightened: A frightened creature flees from the source of its fear as best it can. If unable to flee, it may fight. A frightened creature takes a –2 penalty on all attack rolls, saving throws, skill checks, and ability checks. A frightened creature can use special abilities, including spells, to flee; indeed, the creature must use such means if they are the only way to escape.
That is amazing. Takes someone completely out of the fight, and the best part is that penalties usually stack - so a Frightened, Shaken foe takes -4 to literally everything.
Better than that. The general rule is that if someone would make a Frightened character Shaken or Frightened, it instead becomes Panicked.
Becoming Even More Fearful: Fear effects are cumulative. A shaken character who is made shaken again becomes frightened, and a shaken character who is made frightened becomes panicked instead. A frightened character who is made shaken or frightened becomes panicked instead.
Panicked is another -2, and even if they can't flee, they don't fight, they cower.
Intimidate doesn't allow demoralize to stack with itself to create further levels of fear, but sources of Shaken, Frightened, and Panicked from other sources do stack with Demoralize (this is explained in the FAQ).
So if you can find a non-demoralize source of Shakening Baconing, you can stack that all the way up to 'they cower in a corner while you all wail on them'.
But that's broken!: Eh, not really. Note the 'Try Again' section in Intimidate. Every subsequent Intimidate check takes a -5, regardless of success. So you can't just spam this to victory - you need to succeed quickly on a few checks to frighten them for a round or two, they need to be vulnerable to fear, and anything too big or strong is likely to just resist your intimidate anyhow - it's still a good tactic, but for feat and level expenditure you're putting in it's not overpowered.
Now, this is already pretty alright, despite requiring a level in Rogue and skill points and intimidate boosting feats (maybe?) to pull off. But ideally you want to be applying this condition on round one, not after several rounds of increasingly ineffective intimidate checks. It would also be nice to be able to target more than one person.
Benefit: Whenever you deal nonlethal damage with a melee weapon, you can make an Intimidate check to demoralize your target as a free action. If you are successful, the target is shaken for a number of rounds equal to the damage dealt. If your attack was a critical hit, your target is frightened for 1 round with a successful Intimidate check, as well as being shaken for a number of rounds equal to the damage dealt.
With the Blade of Mercy trait (fluff it as hitting people with the flat of your blade, slapping them, kicking them etc - standard swashbuckler stuff), you can turn every attack into an intimidate attempt (yay). Combined with your high crit range (rapier), and TWF (off hand main gauche), and you could potentially fear multiple weak opponents or a single strong one in a single round.
Don't forget that using Frightening from Thug just makes the new intimidate check make them frightened - it doesn't 'upgrade' or 'remove' the Shaken condition, so...
Shatter Defenses, as it makes Shaken foes flatfooted to your attacks for this round and the next if you hit them when they're already Shaken. a) this is great for getting off sneak attack from that Thug level you took, b) this lowers their AC and also their CMD (trip them! kick them down stairs! swashbuckle! swashbucklers win the battle in the hearts and the minds before the first foe is struck!).
Shatter Defenses requires Dazzling Display, which is actually a good feat to have for this build regardless. It allows you to make an Intimidate check against everyone in 30' as a Full-Round Action, and you do it by showing off your sword skills! Talk about Swashbucklery. Normally that's a Waste of a Turn since Shaken isn't that great and if you're entirely surrounded by enough foes to make it worthwhile you should be tumbling to safety. But against weaker foes, with Frightening from Thug, you can show off a dazzling display of swordsmanship, Errol Flynn style, and watch an entire room of mooks lose their crap and flee in terror! Talk about awesome.
To optimize your Demoralize, I suggest you startize with Taunt. That way, instead of growling death threats, you can send them packing with witticisms about their mother! Or puns!
If you have backwards compatibility, the skill trick Never Outnumbered might come in handy, but you should steer away from Imperious Command, is it will result in flying DMGs.
Also, if you go this route, specialize your gear vs common fear-immune enemies like undead, and Paladins. Since that way you won't be a one-trick pony (Although this trick is cheap and leaves you room to develop your melee damage and whatnot).
It's worth noting that intelligent undead and the like actually seem to be affected by Demoralize - pathfinder uncoupled 'morale' from 'fear', so you can Shaken a Paladin or a Vampire, you just can't use Cause Fear on him.
For the purposes of the resistance/immunity example in the original question:
"bludgeoning, piercing, and slashing from nonmagical weapons that aren't silvered"
The "weapons" portion of the example is actually sufficient to know that it does not apply against the example sources of damage, magical or not. The resistance only applies to specific damage type subcategories of weapon damage. None of the given examples are weapon attacks, so this resistance/immunity to damage from weapons does not apply to the given non-weapon examples in the question regardless of what type of damage is being done.
That said, errata has updated most (all?) instances of the given resistance/immunity example in the question to the following:
Bludgeoning, Piercing, and Slashing from Nonmagical Attacks that aren't Silvered
(Weapons -> Attacks)
Now it's clearer that the magical status of the attack itself should be considered.
The Sage Advice compendium provides the following checklist for determining if something is considered magical (see also: How do I know if an ability is magical?)
If you cast
antimagic field, don armor of invulnerability, or use another
feature of the game that protects against magical or nonmagical
effects, you might ask yourself, “Will this protect
me against a dragon’s breath?”
Determining whether a game feature is
magical is straightforward. Ask yourself these questions
about the feature:
- Is it a magic item?
- Is it a spell? Or does it let you create the effects of a spell
that’s mentioned in its description?
- Is it a spell attack?
- Is it fueled by the use of spell slots?
- Does its description say it’s magical?
Since the question's examples are all spells or spell attacks, they fall cleanly under the umbrella of being magical. As such, thorn whip and the initial spell attack of ice knife are considered magical attacks, which clearly bypasses the errataed resistance/immunity text. Damage dealt as an effect of spell that isn't related to a spell attack roll (like the damage of earth tremor) is both magical and not from an attack, so the resistance/immunity text also doesn't apply there.
It's also worth noting that there's currently no such thing as an attack that is both a spell attack and a weapon attack, as noted in answers to a question about how to refer to non-spell attacks.
I would allow it as a GM.
Strict-RAW, the answer would be yes; the weapon is still a piercing weapon even if you are doing things to change the damage you deal with it. Weapon Versatility doesn’t change the weapon, it changes the damage you deal with it, so the weapon is still compatible with the swashbuckler features.
But then, I would also allow a swashbuckler to use Weapon Versatility with a non-piercing weapon to use those class features. Actually, I would probably allow a swashbuckler to use any weapon he or she likes with those class features.
And I would do that because the swashbuckler is an extremely weak class that needs all the help it can get. And ultimately, that is the most important consideration to me: what makes for the best game? The limitation here is not adding anything, and is potentially frustrating an already-weak class. Expanding the capabilities here is thus an improvement to the game.