What is a technique used to stop bleeding that is very dangerous since it stops all flow of blood?

A tourniquet is a method of stopping bleeding that stops all blood flow.
Tourniquets are what you are looking for.

A tourniquet is a constricting or compressing device used to control venous and arterial circulation to an extremity for a period of time. Pressure is applied circumferentially upon the skin and underlying tissues of a limb; this pressure is transferred to the walls of vessels, causing them to become temporarily occluded.
A tourniquet.
tourniquet - something that is tied around a limb to stop severe bleeding.

a tourniquet

You are describing a tourniquet. Once a mainstay of every first aid course, tourniquet is now, as you say, used only as an absolute last resort. If a wound is deep enough to have cut a major artery (the wound is literally spurting jets of blood) a tourniquet is the way to go, yes. But for even a deep wound where there is no "spurting" blood, soft pack pressure compress is the preferred method.