Merging Cells Inside a Repeating Group

Has anybody actually achieved conditionally merging cells inside a repeating group?

I’ve never figured out how to merge cells conditionally. I’ve seen multiple people ask this question and someone always answers that there is a way to do it but nobody has offered any details or examples.

An example would be merging different cells on a timetable depending on the time length of a booking.

Below are some past posts asking the same question:

Merging Cells in a Repeating Group
Is it possible to merge several sequential cells of a Repeating Group?
Table: Merge cells cross a row