EDIT FOLLOWING A MORE ATTENTIVE READING OF THE QUESTION
The short answer is ‘No’ A marked infinitive is obligatory, as may be seen from counter-examples:
✲What we plan is take the train to New York.
✲Caesar’s objective was break the power of the Druids.
The question then becomes, Why is the bare infinitive acceptable in your two examples?
I note that in these examples, the construction with a marked infinitive is equally acceptable as without:
All he’d tried to do was to jump behind the trash cans.
A great thing to do is to dance the night away.
All he’d tried to do was jump behind the trash cans.
A great thing to do is dance the night away.
But if we invert the predication, the marked infinitive is required:
To jump behind the trash cans was all he’d tried to do.
To dance the night away is a great thing to do.
These two facts lead me to believe that what we have here is not bare infinitives but ellipses: the marker is allowed to be dropped because in each case it is preceded by a (somewhat parallel) marked infinitive, to do. This seems to be confirmed by the fact that if we delete those to dos, the resultant unmarked infinitives are no longer acceptable:
✲All he had tried was jump behind the trash cans.
✲A great thing is dance the night away.