Yes something like that would be great and they can also learn about coding without a computer: http://researchparent.com/coding-a-lego-maze/ This can be done individually or in pairs. This can be adapted depending on the grade you teach. The goal is to get your lego person out of the maze with the least amount of code. This is done in phases depending on age and understanding. It is a great way to introduce coding, problem solving and critical thinking skills. Plus you get to build a maze with Lego I think any opportunity to have students build structures(engineer designing) to solve real world problems is invaluable and fun.
I believe during class time could work also. It could be a great end of the day kind of thing and students can do group builds based on a restriction/question or depending on the grade a way to assess math. Such as making patterns or counting. You can use Duplos for smaller hands.
You are right and I think it would be good to have students finds ways to maybe look for that virtue through books they read or people in history. There has to be a built in way for students to keep that in mind through out the month.