@com3 here is how I have implemented it for the Bear Project. I am using Prusaslicer for this:
Everytime after a first layer finishes I am calling the system file "layer_change.g". This happens through the Before layer change G-code in Prusaslicer:
; Before layer change G-code
; called before the print advances to the next layer
G92 E0.0 ; reset extruder position to 0
{if layer_z == layer_height+first_layer_height}M98 P"layer_change.g"{endif} ; execute layer_change.g
;[layer_z]
So whenever a print switches from 1st to 2nd layer "layer_change.g" is being called:
; layer_change.g
; system file, called on first layer change during a print from Prusaslicer to save applied babysteps to config-override.g
; requires modifications to layer change G-Code in Prusaslicer
if move.axes[2].babystep !=0 ; if no babysteps are currently adjusted - exit routine
echo {"OLD: " ^ sensors.probes[0].triggerHeight ^ " NEW: " ^ sensors.probes[0].triggerHeight + (move.axes[2].babystep * -1)} ; displays old and new Z probe trigger height
G31 Z{sensors.probes[0].triggerHeight - move.axes[2].babystep} ; measures and applies new Z probe trigger height
M500 P31 ; saves new Z probe trigger height to config-overide.g
This will add or substract any baby stepping adjustment to your current Z-Offset value and then stores it in "config-override.g" via M500 P31
Additionally I inlcuded the following in "cancel.g" and "stop.g":
M290 R0 S0 ; reset babystepping to 0
M501 ; load saved parameters from non-volatile memory (config-override.g)
This assures that if a print is cancelled or finished, babystepping is reset to 0 and the new value from "config-override.g" is being called.
Now I know this is a workaround more than anything and I would love for this to be implemented in the firmware itself. Our goal is to make 3D printing as easy as possible for everyone and in our opinion this means keeping users away from system, config and macro files for printers where a "out of the box" configuration is published. Ideally users should only have to interact with either the printer display or the webUI. Prusa does a great job with that and this is why so many people can just get started with their printers even though they have no experience at all.
I hope this helps to find your own workaround.