If you use say Proxmox and create your own macOS image and compile your own Opencore then you should be OK. You can do same on VirtualBox. (On a PC, cause I doubt older MBPs have the necessary stuff like VT-d.)
Of course, once Apple kills off x86-64 macOS it is going to become more complicated.
My issue with that is 1. Can I trust the hackintosh to not be compromised and 2. Uploading an IPA via hackintosh feels like bananas.