Oh yeah. I'm fully guilty of this. I've got some financial software I've written up (autotrading and backtesting). It's in Python. It's not well optimized, I would guess if I went through the entire thing and wrote it just for performance I could double the speed. It's written to be simple and failsafe. In this scenario, I'd also (most likely) have to rewrite the whole spiel in C, and in some cases (some of the data sets are bit large) probably further optimize for memory use (... if you're going to have to regress to older CPUs, you're also going to have that older motherboard that won't take 16+GB RAM. Of course there's still some "garbage tier" notebooks with 4GB in them, and many with 8GB so ideally one would already be used to at least giving some care to RAM usage.)
So the forgetting how to make new CPUs is an interesting thought experiment. So we aren't having that happen, but...
1) It does seem like Moore's Law dropped off roughly around 2010 or so. Core 2 Duo era, you were maybe not seeing quite a doubling every 18 months, but it was still maybe every 2 years. It's now completely typical to only see a 10% increase, if that (Intel's recent issue of having 14th gen show near-0 speedup, and slowdown in some workloads, compared to 13th gen.)
2) You *can* put tons of RAM in a lot of systems, but so many ship with 4-8GB, so maybe double to 2-4GB they shipped with 20 years ago.
3) And with move from hard drives to SSDs, well, again, systems were shipping with 250GB hard drives like 20 years ago, and I even purchased a 750GB *IDE* hard drive back in the day. 750GB-1TB storage was completely typical around 10-15 years ago. You can buy huge hard drives now, but with so many people doing "SSD or nothing" the amount of storage space in the typical computer has actually decreased compared to like 10-15 years ago.
I find the 3rd point the most disappointing -- SSDs above 1TB are still far too expensive, and notebook drives top out at 2TB because bigger ones are "too tall" (and, due to low demand, the HDD companies are not applying new tech to 2.5" drives to get more data per platter that they do on 3.5" ones.) I actually got a notebook with room for a SATA drive, so I have a 1TB SSD and 1TB HDD in there, I'd LOVE to get far more storage in there. Damn the memory and SSD companies for running a cartel (the SSD prices are fairly high partially due to collusion and price fixing. Samsung, Hynix, etc. get investigated for collusion... at that gov't speed so it takes 4 or so years.. found guilty, fined, they keep colluding, US or EU etc. start their next investigation for collusion which takes another 4-5 years, fined again, rinse and repeat for at least the last 25 years.)