I'm currently building a submarine in Minecraft. When I was in the boat once, there was such a sound. It sounded like metal that someone often hits on it or something. And it is exactly this sound that somehow fits a submarine perfectly when it submerges. So is there any command with which you can trigger these sounds manually?
Sure it works. You could program it or possibly open it with command blocks. However, I'm not sure about the command blocks. But programming is safe.
Of course you can with Commands. Here is the wiki entry
You can record and then insert the sound you want