We would like to record audio from a plug-in directly from the audio hardware so that the plug-in does not have to rely on the audio coming from the DAW. Are there things we need to keep in mind when doing this? Our experiments have shown that it might be possible but that there are some exceptions when this will not work. My own assumption is that the OS might not like it if one process (DAW & Plugin) both try to connect to the same audio device.
For me, the risk is too high and there are a lot of edge cases depending on the operating system, drivers, and hardware.
IMO this should be handled by the DAW, unless you do some hardware that you also sell and want to connect directly to the plugin.
I have added a side chain input in my plugin as a solution. You can aggregate audio input and outputs on mac os. This way you can also route more than one audio device into your DAW.
But hard to tell what the best solution is, without a concrete use case.