Yeah it is basically a joker scheme.
Another way to look at it is like a device that you and I sit on opposite sides of.
If I put in a coin, you get three coins. If you put in a coin, I get three coins.
Putting in a coin strictly hurts the actor putting the coin in. Playing it “optimally”, there’s no reason to ever put in a coin. Even though we could easily both walk away two coins richer, if we are “purely rational, self interested actors”, we’ll both walk away with nothing.
Technically, this scenario is flawed because “betraying” the other person makes the scenario worse for everyone if the other person also “betrays”. A true prisoner’s dilemma is supposed to be pretty clear cut “always right to betray”, meanwhile in this a selfish actor would have reason not to pull the lever as to avoid losing the people on their trolley.