thing that can happen? Is the car a utility you'd just replace? Or is this car an object of affection that you'd pay any price to keep forever? You say you'd keep it a long time.
Can you afford a $3k expense? A $7k engine swap? How would you feel about the sure $2k expense against a 25% probability of a $7k expense? (That probability is not based on any facts, BTW, just had to pluck one.) What if it were 10% or 50%?
How would you feel if two weeks after the IMS swap your car was totaled? Or the engine broke for a completely different reason? Why are you focused on the IMS? There are dozens of other parts that could take out an engine. Some more probable to fail.
How many other parts once the transmission is out are you going to replace while you are in there? $$$ Do you periodically replace the water pump (a high wear out item)?
You don't even know for sure what generation IMS your car has so statistics are a total swag.
We all have different risk versus reward profiles. I could have paid cash for a new Boxster, instead bought an older one. I almost wanted a failure to have the fun of a rebuilt and upgraded engine. Yet I have said I had as much fun in my base Boxster as I did in my S. I recognize my lack of logic.
I'm not sure there is a technical or statistically accurate answer to the "should you" question. Some things are best done on emotion and how they make us feel.
Someone just contacted me telling me he saw my name in the records of a '01S he bought and he brought me up to date on its condition. Still original IMS. But half the miles of your car.