mysql database, 2400 records for 1500 rows
Rolling 100 days -- I recommend using PARTITIONing and break it into weekly partitions.  It will be about 17 partitions.  Details:  http://mysql.rjweb.org/doc.php/partitionmaint .  DROP PARTITION is much faster than DELETE.

It is possible to map between "hour" and "datetime" (or "timestamp") with some arithmetic involving FLOOR( ... / 3600).  Then that will fit nicely in MEDIUMINT UNSIGNED and replace 3 of Vérace's columns.

Don't have an AUTO_INCREMENT if you have a 'natural' PK.  Suggest

PRIMARY KEY(sensor_id, hour)


and

PARTITION BY (hour)


You may, but probably won't, need

INDEX(hour, ...)