Re: "A ship in port is safe. But that's not what ships are built for"
"In both wars UK could have attempted to shorten them attacking Germany or Italy from the sea, and not only from the trenches."
The Imperial German staff knew exactly what they'd do if the six division strong BEF landed from the North Sea. "We'd send the police to arrest them". 160+ divisions Germany had nothing to fear from a BEF landing. Italy (as was already pointed out to you) was on the same side in WW1. The WW2 invasions of her did not do much to shorten the war - if anything.
"Which was the last great UK naval battle after Trafalgar, against a comparable fleet, and not in great superiority?"
Falklands (1914) Dogger Bank (1915), Jutland (1916), River Plate (1939), Cape Matapan (1941), Denmark Straight (1941), Java Sea (1941), Norway Sea (1943) all spring to mind. No doubt others can remember more.
"Italy had the same fears, and instead of attacking Malta with the fleet kept it hidden as well - especially whem Malta air defense was almost depleted."
See Cape Matapan. Not the actions of a navy afraid to be at sea. The Italians stopped going to sea when they ran out of fuel, not before.
"It is true UK carriers were so slow to deploy and refuel their few planes - that they weren't much useful in a true modern battle to enable a CAP and attack enemy ships."
HMS Victorious went to the Pacific to help out the USN in 1943 when the US was very short on carriers. She was regarded as being so good at running CAP that the other carriers ran the attack squadrons and left CAP to her.
"Distant blockade? Germany didn't have a real fleet - and you don't use battleship for a commercial traffic blockade - while its u-boote almost blockaded UK, being free to operate - until US brought in a lot of ship and airplanes to fight them."
WW1, the German fleet was a very real fleet and it engaged the RN in very real battles. Likewise WW2.
"And what blockade was performed in the Mediterranean? The German took Greece, Crete, and almost the Egypt. Thank Suez... and Franco."
The blockade that meant that the blockhead called Rommel couldn't get enough fuel/men/munitions to get into Egypt. That one. The one that sunk the convoy of barges bringing men to Crete for the invasion. That one.
Frankly I haven't see as big a pile of dribble as what you wrote since the last time I saw a toddler with a biscuit.