Quote
I'm no expert, but I understand that pianos are tuned slightly sharper than normal pitch at the higher octaves (with each note interval per octave representing the 12th root of two - the semitone interval), and this is deliberate, because the human ear hears 'flatter' at higher frequencies.

This is called Stretch tuning or Octave Stretching. There's more of a stretch in the bass as one goes lower than in the treble. Some Peterson tuners have these curves built in and they also publish them for those who wish to adjust the temperment manually. The length of the soundboard is the key factor though pianists who play softer than average do not require as much stetch.
Peterson 490-ST Manual with recommended stretch guides

Quote
James Taylor pointed out that very thing about guitars in a video I watched once. He said most guitars are notorious for this inherent flaw, that some of the strings have to be slightly out of tune at times to sound right.

JT is describing tempered tuning. This wasn't new when JS Bach wrote about it in 1722, either.


BIAB 2024 Audiophile Mac
24Core/60CoreGPU M2 MacStudioUltra/8TB/192GB Sequoia, M1 MBAir, 2012 MBP
Digital Performer11, LogicPro, Finale27/Dorico/Encore/SmartScorePro64/Notion6 /Overture5