Yes, you can deduct the full value of qualifying equipment you buy and put into service this year, even if you keep it for years to come. It's not a loophole - it's an intentional incentive created by the government to encourage businesses to invest in equipment. Unlike most government incentives, this one is actually useful imo. It applies to both new AND used equipment, as long as it's new to you - so it's not just going to companies who are good at lobbying (looking at you EV cars).
I've used it plenty of times. NOT FINANCIAL ADVICE - talk to your accountant. But it's a game-changer. My big take aways were (1) the equipment must be used for business over 50% of the time (means I can use a machine on my ranch some) and you need to have a taxable income stream from the machine.