Counterpoint: Porsches are notoriously horrible in 24 hours of lemons. These are mostly 924, 944 and boxsters.
For 18+ hours of w2w racing I'd take the Corolla.
In any case, apples and oranges. Porsche seems to build reliable stuff compared to their actual competitors which are Ferrari, Lotus, etc etc. Toyota comparisons are meaningless.
I'm not very familiar with the Corolla specifically, but most modern regular cars don't have enough cooling capacity for the engine or brakes, to be driven flat out, and the oil supply systems can starve the engine of oil if driven at max cornering on a long sweeping curve. All of those issues can pretty much cause immediate failures if taken on a track, even in a well built car that isn't designed to be used like that. There are probably simple aftermarket solutions that do prepare a Corolla for reliable track use but you would likely at a minimum need different engine oil, brake fluid, and brake pads... whereas any Porsche model will be factory spec'd with fluids and consumables suitable for track use.
Look at this for example:
Porsche 986 Boxster S front brake rotor: 318 mm x 28 mm
Toyota Corolla AE101R front brake rotor: 238 mm x 22 mm
You have massively larger brakes on the Porsche... and many Corollas even have ancient drum brakes on the rear, which can barely dissipate enough heat for normal non-track driving. The Corolla will boil it's brake fluid on the track, and the pedal will go soft which is extremely dangerous.
Late 80s early 90s Corollas were very popular first track day cars in Australia and New Zealand. A standard AE92 Corolla FX-GT will happily go on a track day as long as it has fresh brake fluid. I've done it!
For 18+ hours of w2w racing I'd take the Corolla.
In any case, apples and oranges. Porsche seems to build reliable stuff compared to their actual competitors which are Ferrari, Lotus, etc etc. Toyota comparisons are meaningless.