How can I be sure my replacement SPI flash chip will work?
You could compare the datasheets.
Or limit to checking the parameters the chip actually needs.
Fortunately Cypress has published a knowledge base article KBA221833 which instructs how to select a compatible SPI flash.
So if used voltage, clock speed and used commands match, the size just needs to be withing some limits to have the right amount of address bytes in the protocol.