In Stampy’s and Sqaishey’s Sky Den series, they made a cobblestone generator in such a way that the cobblestone wouldn’t be burnt by the lava. A piston would push out the cobblestone made, leaving space for the lava and water to mix, creating more cobblestone. The piston would stop pushing out blocks when the row of cobblestone was 13 blocks long.
Here is the video:
I made a similar contraption but changed the redstone a little bit to make the piston extend less often. I also used different materials to hold the lava and water. But aside from that, my generator is almost exactly the same as Stampy’s.
Here are the pictures: