Hello, Zed. Your defintion of 'practical joke' sounds pretty good to me alright. But it does not solve the problem of "cosmic joke" imo.
Cosmic jokes, (if we come to the right understanding of the word at all), are fickle. Touching 'good' and 'bad' equally.
Maybe the problem is caused by the way the writer of the original sentence
(translated by Callitthump) uses these words. Maybe if he had just used the simple words 'the ironic thing' it would have not posed this problem to translators. For that's what it finally is. Ironic. This income business. "Cosmic Joke " makes it look more than it is.
To use "cosmic joke" it would need a special setting, context. Like that example above of someone missing the boat that goes down. I think there should be a shocking surprise element in it. Practicle jokes maybe are man- made? Cosmic jokes are made by fate. Anyway,I did my best (big effort to cross the line from dreaming to thinking )
I like the subject.