Does the order of the code snippets play a role? Is it correct in the above example?

Yes, the order of the directives in Apache config (.htaccess) files can be important. In fact, simply having directives in the wrong order is a common cause of error. With WordPress, people often make the mistake of including blocking directives after the WordPress directives - this is unlikely to work (although this does depend on the directives/modules used). Primarily you should always have external redirects before internal rewrites.

In what you have posted, the order of the directives look OK.

You should note that different modules (mod_rewrite, mod_alias, etc.) are largely independent and run at different times. But for each module the directives execute top to bottom.

RewriteEngine On

It doesn't matter too much, but RewriteEngine only needs to occur once in the file, preferably at the top, before any mod_rewrite directives (just because it's more logical and easier to read that way). However, it can be placed anywhere in the file and it will still work (at the expense of readability)! Strictly speaking, if you have multiple RewriteEngine directives then the last one wins and controls the entire file. So, if the very last RewriteEngine directive was RewriteEngine Off then it would be Off for the entire file!

<IfModule mod_rewrite.c>

In the code you have posted, checking if the module is loaded multiple times is unnecessary. In fact, you probably don't need to check this at all. Can your site run "OK" (or do you still wish to allow access) without mod_rewrite enabled? If not, then there is no need to check for this - it should simply fail with an appropriate error state.

RewriteBase /

Having multiple RewriteBase directives should ideally be avoided, although it will work OK in this instance. The last RewriteBase directive in the config file wins and controls the entire config file (like the RewriteEngine directive mentioned above). If you include a RewriteBase directive then it should really be included just once immediately below the RewriteEngine directive.

As it happens, apart from the slight error mentioned below, you don't actually require the RewriteBase directive in the file posted above. (The RewriteBase directive overrides the directory-prefix that is added to relative path substitutions in the RewriteRule. You don't have any relative path substitutions - apart from that mentioned below.)

Having repetition in .htaccess is common when multiple modules are automatically editing it. By hand coding the config file (recommended), this can be avoided.