1990 integra bucking. Throwing code 4 help please

Alright so this is my first post and yes I’ve searched first. All four of my injectors on my integra were leaking so I decided to replace them(rebuilt). While I was at it I cleaned the throttle body, with tb cleaner and the iacv with carb cleaner. Disconnected the battery before anything. I took off gas cap and took the 12mm bolt off of the fuel filter to relieve the fuel pressure. After all of that, I tried to crank it over and there was barely any combustion. I flooded cylinder 4 and 3. I waited overnight and the car started. Idle felt a little weird so I adjusted the idle screw to where it idled at 900rpm. Car felt fine after that. I drove 100 miles to go snowboard and 100 back 4 hours later. No problems. When I got back to town, the car started bucking and the Rpms were jumping around like crazy, threw cel and it read code 4. Crank angle sensor. After researching I replaced cap, rotor, coil, and wires. Still the same. It wasn’t until warm that I had the code and bucking. I went back in today and cleaned the iacv again and now it can barely stay alive and throws a code when cold. Still with the same bucking issues and still only code 4. I’m at a loss here and I don’t want to just throw parts at it. Any info could help. Please help!

You replaced everything but the sparks plugs. Try that first.

Plugs have 2000 miles on them NGK V-Power. I pulled them out to help the tb cleaner evaporate. They’re all good. I’m about to replace the distributor, I work at a parts store so I can return it if it doesn’t help

Dumb question. But did you replace the crank angle sensor?

Not a dumb question, but on this car the crank angle sensor is in the distributor and after researching its non serviceable. I replaced the distributor last night and no code after test driving. Everything seems fixed. I just need to adjust my timing to spec. If you have red dust in your distributor cap, and a weird grinding noise from the distributor, more than likely the bearing is shot and the §§§§§ will chew through caps and rotors and continue to destroy itself until it’s replaced. I just wish I didn’t have to drop the 200 bucks but ill suck it up. I have 307,000 miles and it’s now on it’s third distributor

I just went to the junk yard and cut out some of the hall effect sensors from old distributors and soldered them in. I have become quite good at rebuilding distributors. The hardest part is dealing with the screws that seize.