The feature you are looking for is Interval Timer. For most cameras this means choosing the number of shots, an interval and a start delay. Some cameras also allow multiple shots at each intervals but I have only seen that in high-end models.
To find which compact camera supports this, use the Camera Search page at Neocamera (FD: The digital camera site I've been running since 2005). The trick is to select Interval Timer from the Refine Results column after searching for cameras with your other criteria. Here are compact cameras with interval timer. By default this returns current cameras but you can expand the search to discontinued ones too.
From the above results, there are 11 models currently. Two of them particularly stand out from the rest, the Panasonic ZS100 which I reviewed here. It has a larger 1" CMOS sensor with 10X optical zoom. Also the Ricoh GR II which has an APS-C sensor with a fixed 28mm-equivalent prime.