Real plaster walls consist of at least two layers; the top "gauging" coat which is made by mixing lime putty with plaster of paris, and the base coat which is made by mixing sand into "gauging coat" plaster.
Years ago, plastering was a real skill because you needed to get the lime putty and plaster of paris just right so that it was sticky enough to support the weight of all the sand in the base coat. Nowadays, the "Base Coat" plasters you buy (like Perlite Admix Hardwall from Georgia Pacific and "Structolite" from CGC have perlite in them to give them bulk and make them cheap instead of sand, and they also have powdered glue in them to make them stick. So, nowadays, mixing up a base coat plaster is a no brainer. You put water in the mixing container, add the base coat plaster and mix. The glue makes the plaster sticky and the perlite gives it bulk and very little weight, so moldern base coat plasters will never fall off your lath cuz the lime putty and plaster of paris aren't stiff and sticky enough to support the weight of the sand.
Nowadays no one ever uses real lime putty plaster anymore unless they're doing restoration work on a historic building, or they're repairing the plaster crown moldings in a house after a roof leak, for example. ALL of the plastering contractors will just use a modern base coat plaster (like those mentioned above) and drywall joint compound as the gauging plaster.
And, that's what I've been doing for 20+ years, too.
So, you can use joint compound to patch the white "gauging coat" of your plaster walls. But, a plaster wall is 3/4 inch thick. If you have to replace the plaster all the way down to the lath, then in my view it's best to use a modern base coat plaster to bring the wall up to within 1/8 of an inch of being flush with the surrounding wall, and then use drywall joint compound to bring the wall flush to the surrounding gauging coat plaster. Then prime and paint.
If you have "gyproc lath" plaster, then your best bet is to use drywall as the gyproc lath, a modern base coat plaster as your base coat, and drywall joint compound as your gauging coat.