Display 4 chronological posts starting with a random post

For a random offset we might try:

$ppp    = 4;  
$total  = wp_count_posts()->publish;    

$offset = $total < $ppp ? 0 : rand( 0, $total - $ppp );

$posts = get_posts( [
    'posts_per_page' => $ppp,
    'offset'         => $offset
] );

Example:

Let’s take $ppp as 4 and assume $total is 6.

Then are three possibilities for the $offset, namely 0, 1 and 2:

Nr  Offset Selections
1   0      x
2   1      x x
3   2      x x x
4   3      x x x
5   4        x x
6   5          x

so

$offset = $total < $ppp ? 0 : rand( 0, $total - $ppp );

would give:

$offset = rand( 0, 6 - 4 );

or just

$offset = rand( 0, 2 );