It depends. S5-95U has in-built analog in/out and fast counter, some also have a DP-port. If you don't use them, you can swap S95U by S5-100 CPU 103, but not with S5-100U CPU 100 or 102. If you do use the in-built analog or counters or the DP-port, the only option is to replace with another S5-95U of the same type.
Kind regards,