How does compressibility affect the critical angle of attack?
First, I have to define what the critical angle of attack is:

When an aerodynamicist speaks of critical conditions, he or she means the condition when the speed of sound is reached locally. The critical Mach number is the speed, measured in multiples of the speed of sound, when the top local speed in a flow field equals the speed of sound.

The critical angle of attack is the one when the local flow speed first reaches the speed of sound. Since it depends on the initial flow speed, it is only valid for a given flight speed.

Two parameters are responsible for the local increase in speed: Thickness and angle of attack. A body needs to displace air, so the air will squeeze around it, speeding up in the process (or slowing down in fully supersonic flow).

When the angle of attack is increased, the stagnation point moves below the airfoil nose so the air flowing over the top of the wing needs to negotiate its leading edge first. This speeds it up and leads to a suction peak. Another view of the same phenomenon is that increasing suction on the upper side of the airfoil will accelerate the air flowing towards it.

With a higher flight speed, less local flow acceleration can be tolerated before the critical conditions are reached. There is even a maximum speed in that suction region of high local curvature that will not be exceeded in subsonic flight and which limits the maximum possible lift coefficient. Higher flight speed leaves less margin, so the angle of attack for maximum lift is reduced with increasing flight speed.

If by critical angle of attack you mean the one where maximum lift is reached (conventionally called stall angle of attack), please read here how it can be influenced. Depending on the flight Mach number, flight speed should be increased or decreased to maximize it.