This was exactly what I was looking for, had the same question. Just one thing: Your method has as a downside that it now loads on every post editor, even if the specific block for which the style or script is is not used.
Is there a way to make it conditional on a specific custom ACF block being used?