Yep, I preflash under an enlarger, if I want to do a whole box. The usual guidance is to figure out the exposure that just *barely* registers as a change from paper white when you develop the paper. Typically it's a very short exposure with the enlarger lens stopped down.
To preflash in-camera, you just defocus and aim at something smooth e.g. the sky or better yet put some white tupperware over the lens, and expose two or three stops less than you will expose for the shot.
Preflashing helps effectively increase the subject brightness range that the neg can handle, and also boosts the effective speed of the paper by a half stop or so.
Note that there are also SLIMT techniques, but I have no experience with that yet.