Looking for a compatible camera with 4K, good image quality, PTZ and motion detection in HA

Hi,
I’m looking for a good quality camera with a 4K image, PTZ and motion detection support in HA. I want to be able to move the camera from the camera card in HA and receive events into node red when the camera detects motion. Also i need this to be all local, no dependencies on remote servers for motion detection or other stuff to work. It’s too fragile for my taste to be honest. I don’t mind paying a premium for a good camera, but nothing professional into the thousands like AXIS for example.

I have an old Foscam i’m looking to replace, PTZ sort of works but i cannot get motion events into HA.

Regards
Maciej