Sorry to jump in here but I’d lay money on the crank sensor or a bad connection at the crank.
Why I’m thinking connection is that the camshaft’s and crankshaft’s wiring harness’s run together in the same loom and are relatively close together; unplug one you’re going to disturb the other.
Plus these older 3.8’s were known for crank sensors; try doing what GM calls “simulate road shock” in other words hit the sensor. I don’t mean beat the crap out of it just some light taps. I usually use a long 3/8-drive ratchet extension; with the extension you can (with the engine running) reach down to the sensor and tap on the side of it. If the engine stalls, hiccups anything replace the sensor.
Also have a look at the terminals inside the wiring harness connector; making sure that none of the terminals have spread apart allowing an intermittent connection.
What I’ve done to check the harness (female) terminals for the proper tension; is to take an old sensor or any other connector apart; one that has the same style of male spade terminal that fits the female harness. Take one of the terminals you’ve just salvaged and slide it into the harness terminal you’re checking. You should feel a slight drag and the test terminal shouldn’t fall out no matter how hard you shake the harness.
As for why the car ran ok with the broken exhaust is likely the under hood temperatures were much lower, due to the lack of backpressure, that the exhaust normally creates.
All of the suggestions given here are worth printing off and taking in to the repair shop you’re going to deal with. Most any good technician would at least read it and it might give them a new way of looking at the problem?
Dan.
Canadian "EH"