@zontex OK, you're right, without code it's hard to help. Sorry, my mistake.
In the meantime, I tried a little more to understand the problem better. It's not that the 1-Wire connection doesn't work anymore at all. It's just that the devices are no longer found immediately on the bus after a lot of data has been written to the SD card.
In detail, this call does not find any devices after I have previously written a large block of data to the SD card:
DS18B20.begin();
device_count = DS18B20.getDS18Count();
But if I call DS18B20.begin() twice, all devices are found. Therefore I have placed the function in a loop:
int trial_count = 0;
int device_count = 0;
do{
DS18B20.begin();
device_count = DS18B20.getDS18Count();
trial_count++;
} while (device_count == 0 && trial_count < 10);
M5.Lcd.printf("\nDevices found: %i\nafter %i tries\n\n", device_count, trial_count);
Now all devices are found after one call, if I did not write any data to the SD card before. However, if I write a larger amount of data to the SD card in between, then 2 attempts are needed until all devices are found.
I think the 1-Wire bus is somehow disturbed by the transfer of the large amounts of data. This does not happen with small data. Anyway, the solution is OK and makes sense.