In SlicR , the mother of all slicers, then prusa, SuperSlicer, Cura etc… it was possible to add custom Gcode which was then incorporated into the slicing.
e.g. if {layer1} [M221 S120] which means if the layer is 1 then set the flowrate to 120, then of course reset it in the next layer. The syntax may be incorrect
This is not for beginners, but Chatgpt told me this was not possible. But Chatgpt makes mistakes, maybe someone knows?