Optical packet-switching (OPS) networks remain an emerging technology, as exemplified by the feasibility challenges of optical RAM. Nevertheless, OPS networks possess significant potential advantages, including a high data transfer rate and low power consumption due to the elimination of optical–electrical–optical conversion, compared to conventional electronic packet-switching networks, flexibility in handling traffic fluctuations due to packet-switching principles, and low latency as they do not require overhead for communication path establishment. However, effective data recovery from non-negligible packet loss due to optical packet collisions remains a critical challenge in OPS networks. Packet-level forward error correction (FEC) is regarded as an effective data recovery method for lossy networks, such as OPS ones, because it does not rely on packet-by-packet feedback, which could be lost, and avoids the delays associated with feedback and retransmission. On the other hand, FEC requires the transmission of additional packets beyond the original data, increasing the computational load associated with encoding and decoding. In this paper, we propose a data transfer method based on erasure coding, which is useful not only in OPS networks but also in other network environments suffering from severe packet loss due to collisions or signal degradation, such as optical circuit switching networks and wireless networks. This method improves effective data transfer throughput by limiting the number of transmitted packets and reducing the computational overhead of the encoding and decoding processes. This improvement is achieved through the appropriate configuration of the distribution of XOR operation target packets that constitute XOR packets, thereby restricting the number of symbols encoded in each XOR operation and introducing cumulative feedback of which symbols were already recovered at the receiver. To validate the proposed method, we conducted not only simulation evaluations but also what we believe to be the world’s first packet transmission demonstration experiment using packet-level erasure coding over an actual OPS network testbed, taking actual computational overhead into account. The experimental results show that, in high transmission rate environments, the proposed method achieves up to a 188.7% increase in effective data transfer throughput compared to the benchmark LT-Codes-based packet-level FEC transmission method while reducing the processing time on the sender side by up to 15.6% and on the receiver side by up to 39.4%. In addition, the number of packets required for data decoding can be reduced by up to 63.3%.