Any goods wholesaler I know of goes straight from "in stock, the price is X" to "out of stock, even if you offer a million $ you can't have any". Nobody auto-increases prices as stock runs low.
Perhaps it isn't illegal to do so, but nobody does it, probably because businesses believe it's illegal to do so.
Also as a practical matter the software they're running simply doesn't have the feature to dynamically change prices based on inventory and lead time. So someone would have to manually update all the parts prices, then lower them again later. Not worth the hassle.
The answer might be affirmative, but that doesn't mean that doing so is a good business move. If you were in charge of sourcing at a company, and a supplier pulled that shit on you, you'd be finding a replacement supplier rightquick. If a supply will gouge you for this reason, you can be sure they will be looking for other reasons in the future.
TL;DR: price gouging, even if legal, is bad optics.
Price gouging laws are exclusively a local and state matter, and only apply at the retail level. Although there have been proposals for price-gouging laws at the federal level, none have been enacted. State laws don't generally apply to B2B interactions.