Raspberry Pi 4 8Gb freezing

I recently bought two Raspberry Pi 4 8Gb.
Both were set up the same to do the same task. I have them plugged into a TV and continually show a web page with a map that tracks our council’s vehicles. I am using the latest version of Chromium.
I am connected to WiFi and have a wired keyboard and mouse plugged in and a HDMI adapter.
One Pi is behaving itself very nicely and the other is constantly freezing. On average it happens after about 20 minutes, but sometimes as short as one minute.
By freezing I mean the keyboard and mouse stop working and the screen doesn’t update. This is easy to tell as the clock gets stuck at the time the Pi froze.

In case it was a software issue I copied the SD from the working Pi on the freezing Pi. Problem continued.
I then swapped the SD cards and the problem continued on the bad Pi. It didn’t move with the SD card. That eliminated the SD card or software as a cause.
I have now swapped the power supplies in case that is the problem but logging something here in the meantime (as the bad Pi is off site).
Any thoughts or suggestions would be appreciated,

You’ve followed a good problem isolation technique.

Add to your list a swap of keyboard and mouse, in case the problem follows them.

Council buildings often have reasonably powerful VHF or UHF radio transmitters for crew or emergency use. See if the crash coincides with use of those networks. If so, add suppression chokes to the USB peripheral cables, and to the power supply cable.

Add a temporary UPS or battery supply to exclude brief grid outages as cause. A sudden AC droop combined with hot power supply and high demand can trigger the Raspberry Pi power management IC.

After that, if it were me, I’d enable kernel serial console output, and attach a laptop or something to capture and log what is seen. Some types of crash give pertinent details to the kernel serial console. Some don’t.

You might also do a CPU loading test. Temporarily turn off the application, then run a heavy CPU test, such as a benchmarking tool. See if that promotes the crash. If it does, then I’d suspect a defect of some sort; like soldering variance or ESD damaged silicon; get a third Raspberry Pi 4 8GB to replace it, and ask your vendor to credit you for the not-working one.

Swapped keyboard and mouse with both USB and Bluetooth alternatives and pain persisted.
I have ruled out radio interference and grid outages by running the Pi at home over the weekend (45km away and on a different local power grid).
The longest it stayed up before freezing was a bit over an hour.
I have wasted enough time on this and think it is a hardware issue with the Pi. I will ask the vendor for a replacement.

No worries. I agree with your assessment. I suspect the Pi is defective.

As an additional test method electronics freezing spray is often used. It causes rapid change of shape and size of the metals, and will often promote a crash if one is going to happen for reasons of solder gaps.