Adding pole bone to IK ignores IK constraints
Your problem is limiting Ik bones ranges with constraints. You need to use this panel for Ik:



A simple leg Ik rig is here: How to IK rig legs

How to handle pole bones and their angles precisely is here: How to Set/Calculate pole angle of IK constraint so the chain does not move?