Is the probability of generating invalid blocks reduced by mining transactions unknown to others? I've got a question concerning a possible mining strategy.

I've not found any proof of the strategy, but it seems reasonable to me.

If two mined blocks inserted in the block chain include the same transaction (not a double spent, but simply a transaction mined two times), one of the two blocks is discarded (assuming that all the other transactions in the two blocks are legit).

This is a probable fact, since each transaction is shared/"broadcasted" by a user.
Therefore, a possible mining strategy may let miners keep a list of transactions, mine them without letting others know such transactions exist, hence publish/spread them, just before sending the just mined block.
In this way, the probability to generate a potentially invalid block is reduced.

Am I right? Is this strategy adopted or not? Is it reasonable?
No, this strategy makes no sense because of how blocks are structured in the blockchain. Also, it is trivial for network participants to keep track of which transactions are confirmed, because that's the whole point of mining and the blockchain.



It is possible for miners to keep transactions secret and publish them when they discover a block. This may make sense when a transaction is secret in the first place, and has particularly large fees.

However:


Most transactions are not secret.
Usually, transactions get relayed via the Bitcoin network to the miners, so everyone else knows about the transactions as well.
Blocks compete in other ways besides the transactions included.
Blocks reference their predecessor. Therefore, when two blocks are found at the same time they will both reference the same predecessor. However, only one of the competing block can be part of the longest chain since the following block can only reference one or the other.
The problem of accidentally including a confirmed transaction is non-existent.
Every network participant keeps track of which Unspent transaction outputs (UTXO) exist. Transactions that try to spend a UTXO that was already used are invalid. This includes doublespends, and a replay of a confirmed transaction. Since each node will always consider exactly one block to be the current blockchain tip, it is trivial to notice that a transaction was previously confirmed. (Or rather, that it is no longer available to be confirmed.)