An M20 bolt, grade 8.8 has a tensile proof load of 110 kN.
Using the formula:
Engagement Length = 2*Tensile Area / (0.5*pi*(Major Diameter of Screw - 0.64952/#threads))
Tensile Area = 0.40816 in^2
Major Diameter = 0.816 in
# Threads = 10.16
I get 0.691 inches of thread engagement. Now this is assuming that the thread and the steel plate have the same strength.
If the yield stress of the bolt is 92,000 psi and the plate is standard A36 steel with 36,000psi yield than the minimum strength to ensure that the bolt will fail before it rips the threads out is: 92/36*0.691 = 1.765 inches
I think these numbers are very conservative. Kamax fasteners recommend 1.0*d for grade 8.8 in A36 blind holes, which means your threads are fine.
So, because your load is only about 4,000 lbs AND because most of the load is carried by the first few threads I don't see a problem with this arrangement even if you didn't engage any threads into the I-beam. Of course some other items come into play here such as pre-load and fatigue and whether or not people are standing under this compressor (ie is this bolt a single point of failure?)
Nut-Bolt vs threaded plate each have their pros and cons. Nuts are easier since you don't need to tap parts.
Best of luck on your project!