However, I cannot execute on real hardware. How can I create a circuit to realize this correction on real hardware?
You can simply control $X$ gates with qubits $q3$ and $q4$. You DO NOT have to measure them firstly and then use classical bits for controlling.
The reason is that in quantum computing, controling some qubit with other qubits or with their measured results in classical register is the same.
Hence, you can implement the algorithm on real quantum computer.
I don't think that this will be possible on real current quantum hardware.
An alternative would be to run it on a simulator with a realistic noise model. This means that the circuit will be run in a non-ideal environment, and so should incur errors similar to how it would if it was executed on a real device. This tutorial teaches you how to build a noise model.
AFAIK, this is impossible on IBM's current hardware. See this github issue: https://github.com/Qiskit/qiskit-textbook/issues/119