Can I use a second BL5340 DVK as a sensor for the BL5340 DVK out of box demo?

Yes. The BL5340 DVK comes with a BT510 BLE sensor for use with the out of box demo. But you can also emulate a BL654 BME280 sensor for use with the BL5340 OOB demo by loading the ESS hex files available at the link below

Once loaded the BL5340 will function as a BL654 BME280 sensor and advertise the same advert format.

This application acts as peripheral environmental sensor allowing central devices to connect and monitor temperature, humidity, pressure and dew point. Please note that this is supplied as a test application for the Pinnacle 100 development kit and is for evaluation use only, it has not been tested through PTS for confirming that it adheres to the ESS service specification.

More information can be found here Common_Sample_Apps/ess_demo at master · LairdCP/Common_Sample_Apps · GitHub