Can I calculate the maximum CoP of a heat pump?
Yes. It is simply Th/(Th-Tl). This is the reciprocal of the efficiency of the engine when it is generating electrical energy. Of course a real heat pump won’t do anything like as well. For example, even if it had no motor losses and frictional losses, it has to work between a temperature lower than the outside air and a temperature higher than the room air otherwise no heat would flow at all.