Had you bought a ThinkPad T450 instead of your 2015 MBP, you could have upgraded the RAM, upgraded the SSD with a standard M.2 NVMe drive instead of having to hunt for a compatible one with an adapter (don't worry Apple closed that loophole in 2016, no more upgrades at all), easily replaced the battery if need be and still be running Windows 10 which is supported to at least 2025.
Apple's support is better on iOS devices than the incredibly low bar set by Android, but in the computer space they are incredibly unpredictable (will this model be supported 5 or 10 years? Who knows!) and not particularly good.
Aren't the processors not upgradeable in either case? I really doubt you could happily use a Haswell i5 processor in 2023 without feeling limited.. even if just because software (the OS, websites, etc.) assume a higher performance floor.
The only upgradeable laptop you can buy is the Framework, which is more expensive than a baseline MBP. It also didn’t exist until a few years ago, so we don’t know if it has 10 years of longevity. What I do know is that my 2015 MBP still has hours of battery life even after being used daily for many years.
As far as software, 2017 MBPs can download Ventura, which will be supported until 2025, which seems like a long time to me.