I recommend a t-shirt with a tuxedo design printed on the front. The very definition of smart casual.
He was wearing some sort of jeans and polo shirt combination (the same as the other executives) and it looked terrible to me (the proportions were wrong, the jeans were too long--he looked like a clown) and I thought his attire was disrespectful. The people there, who cared about looking presentable given the importance of the event for the 200-person satellite office, looked much better than the power-ups.
In my opinion, this doesn't show that he only cares about the work and not silly, old-fashioned dress codes, but that he's too good for us to take the time to look good.
In case you mean JP Morgan, here's the CEO, Jamie Dimon, on cover of annual shareholder letter, back in ... 2015:
https://finance.yahoo.com/news/jamie-dimons-style-telling-jp...
The highest ranking person I ever shook hands with was the GP Morgan head of futures department. He came to talk to the whole company to prep for acquisition. So, it wasn't a super official "ceremony", but it was in front of some fifty men, including senior management of the said company. He was wearing a polo shirt, jeans and a pair of sneakers. I don't know if this is how he'd show up to his office in the bank. Likely not (but who knows?)
Also, nobody in that room was wearing a suit.
Maybe your advise works for other places. For vast majority of programming jobs showing up overdressed will raise more questions about your sanity than score any points on preparedness.