Know your bike indeed. Thats the best bet. Leave the dogma in a drawer somewhere. Brake as needed per the situation - being aware of weight transfer and where your center of gravity is going - and build a safe practice into muscle memory so when you have a panic moment you default to something that doesn't upset the apple cart. Slamming on the front brakes is definitely not that. I use the back brake to 'set' the bike initially and then a split second after that bring on the front brake. Thats the move that results in the least likelihood of my going over the bars or the front wheel locking up.
The OP's description of braking technique sounds almost unimaginably dangerous until you think back a few decades and remember what the effectiveness was of rim brakes on a much lighter analog road bike. Back when I was riding one of those yeah sure I was front wheel braking, with the rear easing in afterwards. Front pads wore at about a 3:1 ratio or more. Nowadays I'm pretty close to 1:1.
I still remember a panic stop a few years ago where I hit the fronts going into a corner and found an *oncoming* car in my lane. Panic-hit the front brake which locked the front wheel and sent the bike airborne and sideways a little. Thankfully it was a fat bike so when both wheels came down again I had enough rubber and sidewall to land stably and recovered without crashing.