In the framework of 5G-and-beyond Industry 4.0, jamming attacks for denial of service are a rising threat which can severely compromise the system performance. Therefore, in this paper we deal with the problem of jamming detection and mitigation in indoor factory deployments. We design two jamming detectors based on pseudo-random blanking of subcarriers with orthogonal frequency division multiplexing and consider jamming mitigation with frequency hopping and random scheduling of the user equipments. We then evaluate the performance of the system in terms of achievable BLER with ultra-reliable low-latency communications traffic and jamming missed detection probability. Simulations are performed considering a 3rd Generation Partnership Project spatial channel model for the factory floor with a jammer stationed outside the plant trying to disrupt the communication inside the factory. Numerical results show that jamming resiliency increases when using a distributed access point deployment and exploiting channel correlation among antennas for jamming detection, while frequency hopping is helpful in jamming mitigation only for strict BLER requirements.