dGh comes from the tap generaly with Calcium and Magnesium desolved in the water, both are no harm and actualy used/needed by plants. So harder water means never a shortage of both.. What is ideal depends on plant and fish sp. but most of them do not realy care for it..
dKh between 4 and 8 is considered very good and suitable for growing plants.
Ideal is, having both stable and if what comes from the tap is acceptable it's better to leave it like that. But both kH and gH bellow 10 is considered OK.
But many people have very satisfying results in a rather wide range of values.. So what realy is ideal is a very personal experience. Not having good results is in general not always and more often not realy related to Gh and Kh values.
Ph goes together with kH and Co2, in the morning before plants start to photosynthezise the pH will be lower and gradualy go up towards the evening because plants use co2 from the water column. So in natural equilibrium there always is a fluctuation during the light cycle. Most tapwater will be between pH 7 and pH 8. Because tapwater is under pressure it contains a bit more co2.. So take some tap water and leave it for 24 hours and measure it again. Than you measure a natural equilibrium in pH (Co2 depletion). This is about the pH likely a few 0.1 units higher at mid day when plants are fully metabolising. Till the lights go out, plants stop and start producing co2 and pH drops again. Bacteria in the substrate also produce co2, so it is depended how this all relates to eachother each tank has it's own unique cycle in this. But you will likely never have any huge swings mainly 0.5 to 1 unit pH difference. In general a pH of 6.5 to 7.5 is considered ideal, but also here same story as the others it can go equaly good at pH 8.5, that 1 unit higher than ideal doesn't realy make a huge noticable difference to write home about. Most fish and plants do not realy care much about it..
Trying to make the best out of what you got, is more ideal to work with more often, than chasing an ideal number and overcomplicate a lot of things with adding boosters and acids to get it and keeping it stable.
Adding pressurized co2 is a complete different story.. Depending on your kH it ca be measured how pH relates to co2 contents in ppm. In general in aquarium is aimed for a 30ppm maximum. Use a KH / pH chart to see where you're at, at 30ppm or less depending on how much you want to add.
This way you forcefully add co2 at a starting point, lower the pH to a certain degree before the lights go on and keep it at this valua till the lights go out.