I think we need more information, especially in the form of a circuit diagram and an explanation of the nature of the inputs and outputs and the need for communication between two picaxe chips.
If you need 16 inputs and 16 outputs in a picaxe chip, you are talking about a picaxe 40X2 (if you include the programming output pin as one of your outputs). Nothing is left over to communicate with any other chips.
Perhaps you would want to use (in addition to your 24V to 5V opto couplers) something like the i2c I/O Extender MCP23017, which you can poll for input changes with 2 i2c lines, or use interrupts to detect changes with a third line. If you did that, you could use a second X2 chip as an i2c eeprom to which you could send changes (byte by byte), and accept changes in that chip's inputs using the same 2 i2c lines. If the distance between picaxes is too great for normal i2c, you can use the i2c extender P82B715TD.
In any case, in order to provide directed assistance, more information about your specific needs is required.