In my work I often recondition used routerboard devices, for this purpose I use Netinstall to completely restore firmware and Routeros and obtain a clean installation.
I was wondering if there is a limit of firmware rewrites beyond which it could compromise the reliability of the motherboard flash memory and provide router malfunctions.
No, meaning yes, but it won’t be the re-netinstalling that will trigger it, unless you do it on the same device, on a continuous loop, for weeks, months or years.
The storage installed (of course it depends on devices) is typically a Hinix or Samsung or WInbond nand flash chip, very similar if not the same as the ones commonly used on PC motherboards for BIOS/UEFI.
They have a finite number of write cycles, they are usually rated for 100,000 but noone really knows how many they can actually endure, probably many more.
The writes that the OS reports are numbers of sector writes, it needs to be compared against the number of sectors (blocks) multiplied by 100,000.
Sectors size depends on the specific chip, a common size is 2048 bytes, so a 16 Mb flash will have 8.192 of them.
There are algorithms (wear leveling) that should avoid that the same sector or page is continuously rewritten, so, on average, all sectors or pages should have the same number of writes applied.
Assuming that your netinstall writes the whole flash, it counts 1 against 100,000.
If you do (on the same device) one net-install every 10 minutes, you are doing 6 netinstalls per hour, 144 per day.
The device will fail (at 50% rate) no sooner than 50%*100000/144=347 days of this treatment.